Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1355967
| From | Marc Titinger <mtitinger@baylibre.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH-vs-togreg 2/2] iio: ina2xx-adc: fix scale for VShunt |
| Date | 2016-03-11 16:00 +0100 |
| Message-ID | <rbwHN-7Fn-29@gated-at.bofh.it> (permalink) |
| References | <rbwHN-7Fn-27@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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>
---
drivers/iio/adc/ina2xx-adc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/iio/adc/ina2xx-adc.c b/drivers/iio/adc/ina2xx-adc.c
index e5ac120..6ada336 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:
--
2.5.0
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH-vs-togreg 1/2] iio: ina2xx-adc: update the CALIB. register when RShunt changes Marc Titinger <mtitinger@baylibre.com> - 2016-03-11 16:00 +0100
[PATCH-vs-togreg 2/2] iio: ina2xx-adc: fix scale for VShunt Marc Titinger <mtitinger@baylibre.com> - 2016-03-11 16:00 +0100
Re: [PATCH-vs-togreg 1/2] iio: ina2xx-adc: update the CALIB. register when RShunt changes "Andrew F. Davis" <afd@ti.com> - 2016-03-11 16:10 +0100
Re: [PATCH-vs-togreg 1/2] iio: ina2xx-adc: update the CALIB. register when RShunt changes Marc Titinger <mtitinger@baylibre.com> - 2016-03-11 16:30 +0100
Re: [PATCH-vs-togreg 1/2] iio: ina2xx-adc: update the CALIB. register when RShunt changes kbuild test robot <lkp@intel.com> - 2016-03-11 17:10 +0100
Re: [PATCH-vs-togreg 1/2] iio: ina2xx-adc: update the CALIB. register when RShunt changes Jonathan Cameron <jic23@kernel.org> - 2016-03-12 10:30 +0100
Re: [PATCH-vs-togreg 1/2] iio: ina2xx-adc: update the CALIB. register when RShunt changes Marc Titinger <mtitinger@baylibre.com> - 2016-03-14 10:30 +0100
csiph-web