diff options
author | Marc Titinger <mtitinger@baylibre.com> | 2016-03-11 15:52:30 +0100 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2016-04-03 11:13:59 +0100 |
commit | eaa3476a7ee27c9927531781c8b25365d77e3030 (patch) | |
tree | aad04a7084c39b75550214c676e9252ef7df7256 | |
parent | d65113222c27e2ca0b292a5163ea294428d481b2 (diff) |
iio: ina2xx-adc: fix scale for VShunt
The scale would result in uV instead of expected mV.
Mostly cosmetic, since the value of 'Power' was computed OK.
Signed-off-by: Marc Titinger <marc.titinger@baylibre.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-rw-r--r-- | drivers/iio/adc/ina2xx-adc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iio/adc/ina2xx-adc.c b/drivers/iio/adc/ina2xx-adc.c index 4e56fe3580bf..502f2fbe8aef 100644 --- a/drivers/iio/adc/ina2xx-adc.c +++ b/drivers/iio/adc/ina2xx-adc.c @@ -185,9 +185,9 @@ static int ina2xx_read_raw(struct iio_dev *indio_dev, case IIO_CHAN_INFO_SCALE: switch (chan->address) { case INA2XX_SHUNT_VOLTAGE: - /* processed (mV) = raw*1000/shunt_div */ + /* processed (mV) = raw/shunt_div */ *val2 = chip->config->shunt_div; - *val = 1000; + *val = 1; return IIO_VAL_FRACTIONAL; case INA2XX_BUS_VOLTAGE: |