]> asedeno.scripts.mit.edu Git - linux.git/commit
power: supply: sc27xx: Fix capacity saving function
authorYuanjiang Yu <yuanjiang.yu@unisoc.com>
Tue, 15 Jan 2019 10:32:37 +0000 (18:32 +0800)
committerSebastian Reichel <sre@kernel.org>
Wed, 23 Jan 2019 20:26:56 +0000 (21:26 +0100)
commitd3e67c94e8f607ee90097d296deecf030af9b8ab
treee6ce8f1f35f0c948f9c8cd0d4683a4b47a86a8fe
parent3a28f203c57944ac98a3adcbfacdbfa385966972
power: supply: sc27xx: Fix capacity saving function

We found sometimes we can not get the saving capacity to initialize the
battery capacity, the reason is the user area registers are put on power
always-on region, so we need delay some time to wait until values are
updated successfully.

Moreover we also should clear the USER_AREA_CLEAR register after setting
the USER_AREA_SET register, otherwise we can not save the values in the
USER_AREA_SET register.

Signed-off-by: Yuanjiang Yu <yuanjiang.yu@unisoc.com>
Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/sc27xx_fuel_gauge.c