Commit d466d3c1 authored by Stefan-Gabriel Mirea's avatar Stefan-Gabriel Mirea Committed by Jonathan Cameron

iio: adc: vf610_adc: Fix VALT selection value for REFSEL bits

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: a7754276 ("iio:adc:imx: add Freescale Vybrid vf610 adc driver")
Signed-off-by: default avatarStefan-Gabriel Mirea <stefan-gabriel.mirea@nxp.com>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent a7b8829d
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
#define VF610_ADC_ADSTS_MASK 0x300 #define VF610_ADC_ADSTS_MASK 0x300
#define VF610_ADC_ADLPC_EN 0x80 #define VF610_ADC_ADLPC_EN 0x80
#define VF610_ADC_ADHSC_EN 0x400 #define VF610_ADC_ADHSC_EN 0x400
#define VF610_ADC_REFSEL_VALT 0x100 #define VF610_ADC_REFSEL_VALT 0x800
#define VF610_ADC_REFSEL_VBG 0x1000 #define VF610_ADC_REFSEL_VBG 0x1000
#define VF610_ADC_ADTRG_HARD 0x2000 #define VF610_ADC_ADTRG_HARD 0x2000
#define VF610_ADC_AVGS_8 0x4000 #define VF610_ADC_AVGS_8 0x4000
......
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