mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-27 18:25:05 +00:00
tegra: enable EC sleep in S3
In S3, the EC isn't expecting AP host commands, so it's safe to enable sleep. BRANCH=Ryu BUG=chrome-os-partner:36918 TEST=Check sleep mask in S0 and S3. Also check sleep mask after sysjump with AP on and with AP off. Change-Id: I67f0634631f62ee571e18d2870cd4a6926d4e090 Signed-off-by: Vic Yang <victoryang@google.com> Reviewed-on: https://chromium-review.googlesource.com/251750 Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Commit-Queue: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org>
This commit is contained in:
committed by
ChromeOS Commit Bot
parent
5c1bb2174c
commit
ed3f712101
@@ -466,7 +466,6 @@ static void power_off(void)
|
||||
GPIO_INPUT);
|
||||
|
||||
lid_opened = 0;
|
||||
enable_sleep(SLEEP_MASK_AP_RUN);
|
||||
powerled_set_state(POWERLED_STATE_OFF);
|
||||
CPRINTS("power shutdown complete");
|
||||
}
|
||||
@@ -549,6 +548,7 @@ enum power_state power_handle_state(enum power_state state)
|
||||
return state;
|
||||
|
||||
case POWER_S3S0:
|
||||
disable_sleep(SLEEP_MASK_AP_RUN);
|
||||
powerled_set_state(POWERLED_STATE_ON);
|
||||
hook_notify(HOOK_CHIPSET_RESUME);
|
||||
return POWER_S0;
|
||||
@@ -570,6 +570,7 @@ enum power_state power_handle_state(enum power_state state)
|
||||
powerled_set_state(POWERLED_STATE_OFF);
|
||||
/* Call hooks here since we don't know it prior to AP suspend */
|
||||
hook_notify(HOOK_CHIPSET_SUSPEND);
|
||||
enable_sleep(SLEEP_MASK_AP_RUN);
|
||||
return POWER_S3;
|
||||
|
||||
case POWER_S3S5:
|
||||
|
||||
Reference in New Issue
Block a user