Commit eaa3476a authored by Marc Titinger's avatar Marc Titinger Committed by Jonathan Cameron

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: default avatarMarc Titinger <marc.titinger@baylibre.com>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent d6511322
...@@ -185,9 +185,9 @@ static int ina2xx_read_raw(struct iio_dev *indio_dev, ...@@ -185,9 +185,9 @@ static int ina2xx_read_raw(struct iio_dev *indio_dev,
case IIO_CHAN_INFO_SCALE: case IIO_CHAN_INFO_SCALE:
switch (chan->address) { switch (chan->address) {
case INA2XX_SHUNT_VOLTAGE: case INA2XX_SHUNT_VOLTAGE:
/* processed (mV) = raw*1000/shunt_div */ /* processed (mV) = raw/shunt_div */
*val2 = chip->config->shunt_div; *val2 = chip->config->shunt_div;
*val = 1000; *val = 1;
return IIO_VAL_FRACTIONAL; return IIO_VAL_FRACTIONAL;
case INA2XX_BUS_VOLTAGE: case INA2XX_BUS_VOLTAGE:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment