power: qpnp-bms: do not clamp SOC based on voltage when charging

The BMS driver currently reports SOC to be at least 1% whenever the
battery voltage is above cutoff voltage. However, this can cause an
issue when charging, where the IR drop across the battery causes the
battery terminal voltages to be higher than the cutoff even when the
battery is effectively dead. This makes the BMS driver always report 1%
when charging, even when it should be reporting 0%.

Fix this by not clamping the SOC when the battery is charging.

CRs-Fixed: 634856
Change-Id: I3d85b5b35973123471dc21eb9651c958219795f9
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
1 file changed