power: qpnp-bms: maintain a software coulomb counter
power: qpnp-bms: maintain a software coulomb counter

The ADC can introduce a lot of error when the temperature fluctuates.
The BMS's coulomb counter is fed from the IADC, and over time the
accumulated error can create large inaccuracies in the BMS.

Provide a software workaround by maintaining a software coulomb
counter that resets, error compensates, and accumulates the hardware
coulomb counter in the BMS driver.

CRs-Fixed: 477720
CRs-Fixed: 477717
CRs-Fixed: 433840
Change-Id: I303fc919b054e7917d9625c580297a4b305506f7
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