power: qpnp-bms: scale SoC more smoothly during CV charging
power: qpnp-bms: scale SoC more smoothly during CV charging

Currently the BMS switches from using a coulomb counter based SoC
into using a battery current based SoC when the system goes into
constant voltage charging. However, if the BMS does not switch
exactly at the point where the system hits constant voltage (CV)
charging, the switching can create inaccuracies in the SoC.

Fix this by weighting the battery current based SoC based on how
close the battery is to being done charging. This way there can be
smooth SoC during charging, and an accurate 100% when charging ends.

Change-Id: I0b9a963ca3541af04b408c3fe9ad35602711277b
Signed-off-by: Xiaozhe Shi <4c58d9c21c42c2a4cf34b559441bd01b9c143cf4@codeaurora.org>

TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas