Fixed ai current unit
authorTom Knot <tomasknot@gmail.com>
Wed, 4 Jul 2018 13:26:29 +0000 (15:26 +0200)
committerTom Knot <tomasknot@gmail.com>
Wed, 4 Jul 2018 13:26:29 +0000 (15:26 +0200)
modules/unipi/src/unipi_iio.c
modules/unipi/src/unipi_spi.c
version.txt

index 901708c7a0c9c32ef12c53865db0bfefe58e8a00..7ff68b81b94f4bfe023c9b71cecca93e2aeb7fb8 100644 (file)
@@ -41,7 +41,7 @@ int neuronspi_iio_stm_ai_read_raw(struct iio_dev *indio_dev, struct iio_chan_spe
        case 1: {
                if (ch->type == IIO_CURRENT) {
                        neuronspi_spi_iio_stm_ai_read_current(indio_dev, ch, val, val2, mask);
-                       return IIO_VAL_INT;
+                       return IIO_VAL_FRACTIONAL;
                } else {
                        return -EINVAL;
                }
index 46ff9a0ba590dd5d7397a72275059caa5d97009b..dbe5251bfd6cb25b4c6c971577a2472ca9d83042 100644 (file)
@@ -586,6 +586,7 @@ void neuronspi_spi_iio_stm_ai_read_current(struct iio_dev *indio_dev, struct iio
        stm_true_val += stm_i_off;
        do_div(stm_true_val, 10000);
        *val = stm_true_val;
+       *val2 = 1000;
 }
 
 void neuronspi_spi_iio_stm_ao_read_resistance(struct iio_dev *indio_dev, struct iio_chan_spec const *ch, int *val, int *val2, long mask)
index 2f19025a121199b6bfef0a2b0a36fbbed2340e5e..200a061a85d7238ed1a3e7067c8e09323081010f 100644 (file)
@@ -1 +1 @@
-Repository:neuron-kernel ActiveBranch:[uart_timeout] PrecedingRelease:v.0.12 PrecedingRevision:85(dc69d07) LatestCommit:Wed Jul 4 15:22:26 CEST 2018
+Repository:neuron-kernel ActiveBranch:[uart_timeout] PrecedingRelease:v.0.12 PrecedingRevision:86(27aaaf9) LatestCommit:Wed Jul 4 15:26:29 CEST 2018