mfd: mc13xxx-core: Fix PMIC shutdown when reading ADC values
authorFabio Estevam <fabio.estevam@nxp.com>
Tue, 28 Aug 2018 20:02:40 +0000 (17:02 -0300)
committerLee Jones <lee.jones@linaro.org>
Tue, 23 Oct 2018 07:58:34 +0000 (08:58 +0100)
commit55143439b7b501882bea9d95a54adfe00ffc79a3
tree3ecb441aac317c31f55ddc5643d83df344cf5f89
parent6360e40f421fba0a11bbabaa211c9c22c5cf5e61
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>
drivers/mfd/mc13xxx-core.c
include/linux/mfd/mc13xxx.h