Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 3f9f3a1a authored by Tony Lindgren's avatar Tony Lindgren Committed by Jonathan Cameron
Browse files

iio: adc: cpcap: Fix default register values and battery temperature



Looking at the register dumps from Android kernel on droid 4, I noticed
the values with the mainline kernel don't match. Let's fix this by
initializing the ADC registers to what Android does.

For getting correct values from the battery thermistor, we need to
toggle the CPCAP_BIT_THERMBIAS_EN when measuring battery temperature
to get correct battery temperatures. And looks like we also need to
wait a little bit before reading the battery temperature as otherwise
the results are inaccurate.

Cc: Marcel Partap <mpartap@gmx.net>
Cc: Michael Scott <michael.scott@linaro.org>
Cc: Sebastian Reichel <sre@kernel.org>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 57d14635
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment