Skip to content

Commit 7b5a9de

Browse files
Stefan-Gabriel Mireagregkh
authored andcommitted
iio: adc: vf610_adc: Fix VALT selection value for REFSEL bits
commit d466d3c1217406b14b834335b5b4b33c0d45bd09 upstream. In order to select the alternate voltage reference pair (VALTH/VALTL), the right value for the REFSEL field in the ADCx_CFG register is "01", leading to 0x800 as register mask. See section 8.2.6.4 in the reference manual[1]. [1] http://www.nxp.com/docs/en/reference-manual/VFXXXRM.pdf Fixes: a775427 ("iio:adc:imx: add Freescale Vybrid vf610 adc driver") Signed-off-by: Stefan-Gabriel Mirea <stefan-gabriel.mirea@nxp.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 567a21d commit 7b5a9de

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/iio/adc/vf610_adc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
#define VF610_ADC_ADSTS_MASK 0x300
7878
#define VF610_ADC_ADLPC_EN 0x80
7979
#define VF610_ADC_ADHSC_EN 0x400
80-
#define VF610_ADC_REFSEL_VALT 0x100
80+
#define VF610_ADC_REFSEL_VALT 0x800
8181
#define VF610_ADC_REFSEL_VBG 0x1000
8282
#define VF610_ADC_ADTRG_HARD 0x2000
8383
#define VF610_ADC_AVGS_8 0x4000

0 commit comments

Comments
 (0)