iio: adc: xilinx: Fix VREFN scale
authorThomas Betker <thomas.betker@rohde-schwarz.com>
Wed, 11 Nov 2015 20:24:38 +0000 (21:24 +0100)
committerJonathan Cameron <jic23@kernel.org>
Sun, 15 Nov 2015 12:36:20 +0000 (12:36 +0000)
The scaling factor for VREFN is 3.0/4096 (not 1.0/4096), just as for
VREFP. This is not immediately obvious from the specification (Xilinx
UG480), but has been confirmed by Xilinx support.

Suggested-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Thomas Betker <thomas.betker@rohde-schwarz.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/adc/xilinx-xadc-core.c

index ce93bd8e3f68b82fec81b31f8f1885b908ef0b45..95c0b3d9890cd8e0437ce1b24fdc075146000e35 100644 (file)
@@ -857,6 +857,7 @@ static int xadc_read_raw(struct iio_dev *indio_dev,
                        case XADC_REG_VCCINT:
                        case XADC_REG_VCCAUX:
                        case XADC_REG_VREFP:
+                       case XADC_REG_VREFN:
                        case XADC_REG_VCCBRAM:
                        case XADC_REG_VCCPINT:
                        case XADC_REG_VCCPAUX: