power: vm-bms: Allow clients to specify their power state
The driver forces BMS to S3 state (no VBAT sampling) while in
suspend. There are certain usecases (such as voice call) which
can consume hi-power even during suspend causing the BMS to
loose accuracy if its in sleep.
Use the HI_POWER and LOW_POWER power_supply properties to indicate
the power-states of the clients (usecase). Check this state while
entering into suspend and do not force BMS into sleep if a hi-power
state is requested.
While at it, reduce the BMS wakeup-timeout to 500ms to allow system
to suspend immediately.
Change-Id: Idd21ae701c60fc023f0779aff0240794d725b2c8
Signed-off-by:
Anirudh Ghayal <aghayal@codeaurora.org>
Loading
Please register or sign in to comment