power: supply: sc27xx: Save last battery capacity
authorYuanjiang Yu <yuanjiang.yu@unisoc.com>
Thu, 6 Dec 2018 03:20:39 +0000 (11:20 +0800)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Thu, 6 Dec 2018 21:24:39 +0000 (22:24 +0100)
commit4a040e7c72e6bd2ffc023ecca31e336aec9dbb87
tree421ae0e37b05a282fa6083d92bbc666b47d4f756
parentcaa6e150f8fbcf4011cb7f3b30448f1b1de63b4f
power: supply: sc27xx: Save last battery capacity

Our charger manager can optimize the battery capacity periodically, so
we can save last battery capacity into registers. Then next system
power-on, we can read the last saved battery capacity as the initial
battery capacity, which can make the battery capacity more accurate.

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