Skip to content
Commit 02881861 authored by Harry Yang's avatar Harry Yang
Browse files

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: default avatarHarry Yang <harryy@codeaurora.org>
parent 1cc4edf0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment