aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@nxp.com>2018-08-28 17:02:40 -0300
committerLee Jones <lee.jones@linaro.org>2018-10-23 08:58:34 +0100
commit55143439b7b501882bea9d95a54adfe00ffc79a3 (patch)
tree3ecb441aac317c31f55ddc5643d83df344cf5f89 /include
parentmfd: madera: Remove unused forward reference (diff)
downloadlinux-dev-55143439b7b501882bea9d95a54adfe00ffc79a3.tar.xz
linux-dev-55143439b7b501882bea9d95a54adfe00ffc79a3.zip
mfd: mc13xxx-core: Fix PMIC shutdown when reading ADC values
When trying to read any MC13892 ADC channel on a imx51-babbage board: The MC13892 PMIC shutdowns completely. After debugging this issue and comparing the MC13892 and MC13783 initializations done in the vendor kernel, it was noticed that the CHRGRAWDIV bit of the ADC0 register was not being set. This bit is set by default after power on, but the driver was clearing it. After setting this bit it is possible to read the ADC values correctly. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Tested-by: Chris Healy <cphealy@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mfd/mc13xxx.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/mfd/mc13xxx.h b/include/linux/mfd/mc13xxx.h
index 54a3cd808f9e..2ad9bdc0a5ec 100644
--- a/include/linux/mfd/mc13xxx.h
+++ b/include/linux/mfd/mc13xxx.h
@@ -249,6 +249,7 @@ struct mc13xxx_platform_data {
#define MC13XXX_ADC0_TSMOD0 (1 << 12)
#define MC13XXX_ADC0_TSMOD1 (1 << 13)
#define MC13XXX_ADC0_TSMOD2 (1 << 14)
+#define MC13XXX_ADC0_CHRGRAWDIV (1 << 15)
#define MC13XXX_ADC0_ADINC1 (1 << 16)
#define MC13XXX_ADC0_ADINC2 (1 << 17)