]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit41bf974cd3148b7df4efe71afcc11b875f2947c3
tree3ecb441aac317c31f55ddc5643d83df344cf5f89
parent1fe9ef3f9bd935a2d1ccd6d336ce846d8daa5572
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