power: qpnp-bms: Fix SoC smoothing upon resume

Currently the BMS driver tries to smooth out SoC jumps by limiting
the percent SoC change by the time since the last SoC change.
However, this can lead to an issue where report_state_of_charge is
called before SoC can be unbound. This will increment SoC by 1, but
create a situation where SoC is stuck when the time elapsed gets
reset.

Fix this by resetting the time elapsed only when doing an unbound
SoC report.

Change-Id: I6bdcc8d40b79653b003cc372570091f8adb30164
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
1 file changed