power: qpnp-fg: hold wakeup sources when waiting
Due to the nature of the fuel gauge memory interface, there are a lot of
times where the driver must wait for events to happen. Currently, there
are no wakeup sources being held, so the driver could go to power
collapse while waiting.
This can be disastrous as there are many resources that the fuel gauge
needs to release before going to sleep. If the memory access is held
while the device is asleep, the SOC upon waking up will be wrong and
there will be a higher rock bottom current since the memory access is
open.
Fix this by holding wakeup sources whenever the driver is waiting for
events.
CRs-Fixed: 754225
Change-Id: I0236684e31dc09c31193e7b8970dd26486d54161
Signed-off-by:
Xiaozhe Shi <xiaozhes@codeaurora.org>
Loading
Please register or sign in to comment