power: supply: sc27xx: Fix the the accuracy issue of coulomb calculation
authorYuanjiang Yu <yuanjiang.yu@unisoc.com>
Wed, 31 Jul 2019 10:00:25 +0000 (18:00 +0800)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Mon, 2 Sep 2019 20:49:49 +0000 (22:49 +0200)
commit7384b0e7668f722fcf7abe56f61a7212debd0180
treeddc1fa4eea24ad54b3c71ea2258a30d2f302336d
parent168e68d072756d631a210342d0429c969501b7cf
power: supply: sc27xx: Fix the the accuracy issue of coulomb calculation

The Spreadtrum fuel gauge will multiply by 2 for counting the coulomb
counter to improve the accuracy, which means the value saved in fuel
gauge is: coulomb counter * 2 * 1000ma_adc. Thus fix the conversion
formular to improve the accuracy of calculating the battery capacity.

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