power: qpnp-bms: calculate iavg more frequently
Currently, BMS will not recalculate iavg if it has already done a
soc calculation within the last 15 seconds. However, when battery
voltage is low or SoC is low, the BMS will recalculate soc faster.
When this happens, the iavg is effectively stuck, since it will never
be more than 15 seconds since the last SoC calculation.
Fix this by recalculating iavg if more than 2 seconds has passed
since the last soc calculation.
Change-Id: I661bf38e8369917a6cb6a83f4a30c4e06a6c3c53
Signed-off-by:
Xiaozhe Shi <xiaozhes@codeaurora.org>
Loading
Please register or sign in to comment