]> 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)
commita5f29b9d3b92642365e3b448660a06dbf0038759
tree3ecb441aac317c31f55ddc5643d83df344cf5f89
parent4734045c09d2f48819c4ca2024f18b183c384892
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