mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-08 16:41:55 +00:00
charge_state_v2: No base/lid power transfer in S0ix/S5
BRANCH=none
BUG=b:71881017
TEST=Suspend system, see that base does not provide power to lid,
and vice-versa.
Change-Id: I54e26c9b8decff2afdebc34adb62d4f5cef18e37
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/882524
Reviewed-by: Randall Spangler <rspangler@chromium.org>
This commit is contained in:
committed by
chrome-bot
parent
abdb022a2b
commit
b34b34e6e8
@@ -464,6 +464,16 @@ static void charge_allocate_input_current_limit(void)
|
||||
prev_lid_system_power = -1;
|
||||
prev_lid_battery_power = -1;
|
||||
|
||||
/*
|
||||
* System is suspended/off, let the lid and base run on their
|
||||
* own power.
|
||||
*/
|
||||
if (chipset_in_state(CHIPSET_STATE_ANY_OFF |
|
||||
CHIPSET_STATE_ANY_SUSPEND)) {
|
||||
set_base_lid_current(0, 0, 0, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (charge_base > db_policy.min_charge_base_otg) {
|
||||
int lid_current = db_policy.max_base_to_lid_current;
|
||||
int base_current = add_margin(lid_current,
|
||||
|
||||
Reference in New Issue
Block a user