power: qpnp-bms: recalculate soc immediately upon wakeup

Under certain conditions, sleep current may be very high, and the BMS
may have counted a lot of current. However, SoC is only recalculated
once every 20 seconds of kernel time. If SoC has been recalculated just
before sleep, there may be almost 20 seconds before the SoC is updated.
The user will see SoC make a big jump a few seconds after waking up.

Fix this by recalculating SoC immediately after resume in the BMS so that
SoC is immediately refreshed upon wakeup.

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