summaryrefslogtreecommitdiff
path: root/drivers/iio
diff options
context:
space:
mode:
authorThomas Betker <thomas.betker@rohde-schwarz.com>2015-04-15 21:11:49 +0200
committerJonathan Cameron <jic23@kernel.org>2015-04-19 13:49:44 +0100
commit00db4e52f4541965f7fda225eb458a75f892017b (patch)
treebcb718c73ba855c1f014c0bb5b53e4756f51fdb4 /drivers/iio
parentd6c96c42283601e311a7a1a3d7e51cde9d7fdb6e (diff)
iio: adc: xilinx: Fix VREFP scale
The scaling factor for VREFP is 3.0/4096, not 1.0/4096; fix this to get correct readings. Signed-off-by: Thomas Betker <thomas.betker@rohde-schwarz.com> Cc: <stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/adc/xilinx-xadc-core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/iio/adc/xilinx-xadc-core.c b/drivers/iio/adc/xilinx-xadc-core.c
index 0ad7b502c593..6fa629b3c168 100644
--- a/drivers/iio/adc/xilinx-xadc-core.c
+++ b/drivers/iio/adc/xilinx-xadc-core.c
@@ -856,6 +856,7 @@ static int xadc_read_raw(struct iio_dev *indio_dev,
switch (chan->address) {
case XADC_REG_VCCINT:
case XADC_REG_VCCAUX:
+ case XADC_REG_VREFP:
case XADC_REG_VCCBRAM:
case XADC_REG_VCCPINT:
case XADC_REG_VCCPAUX: