battery: handle early/late suspend/resume of i2c bus
The i2c bus could suspend right after the parallel charger's suspend
i.e. no i2c access available during suspend_noirq stages. Similarly
on the resume path, there is no i2c access until resume() callback.
However the PMI can handle interrupts right before its own suspend_irq
and right after its own resume_irq. Those interrupts could invoke
transactions for parallel charger but that is either too late or very
early for any i2c transactions.
To fix this, hold a wakelock once parallel is enabled and release the
wakelock 5 seconds after parallel is disabled.
Change-Id: Id517b5afca090d7f3ccb31e640512bdb9f902377
Signed-off-by: Harry Yang <harryy@codeaurora.org>
Loading
Please register or sign in to comment