power: qpnp-charger: Fix corner cases for soc based resume
Currently SoC based resume only triggers when SoC is queried. This
does not happen when the charger is inserted/removed, so sometimes
when the battery is almost full and the charger is inserted, charging
will not resume even though SoC is below the set resume limit. Fix
this by scheduling work to read the SoC when usb is inserted.
Also, SoC based resume only checks for battery status to be full.
However if charging never finished, there can be a case where battery
status reads discharging but the charger is connected. In this case
SoC based resume should restart charging. Fix this by checking for
battery status to be not charging instead of full.
Change-Id: I74d318ac4a9b45f0de31c885319c38f6e2732060
Signed-off-by:
Xiaozhe Shi <xiaozhes@codeaurora.org>
Loading
Please register or sign in to comment