power: pm8921-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: I358909c38b0771fe0283386841b6123ddb2931a6
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
1 file changed