diff options
author | Ting Shen <phoenixshen@google.com> | 2022-10-31 13:07:43 +0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-10-31 09:04:30 +0000 |
commit | f99662618617440ee8d94c7e35ee8634105ae959 (patch) | |
tree | 2e9f34e330e8c148c77f261415a697c5e7a80e44 /power/mt8186.c | |
parent | 36ce80c743526953658d0fbff4305b66947eab3f (diff) | |
download | chrome-ec-f99662618617440ee8d94c7e35ee8634105ae959.tar.gz |
power/mt8186: implement ap-idle flag
When EC_RESET_FLAG_AP_IDLE appears, ec should keep the existing power
state.
BUG=b:256085410
TEST=manually
BRANCH=corsola
Signed-off-by: Ting Shen <phoenixshen@google.com>
Change-Id: I1dd0afc6dc9a9c8a24f19f6dc6877b81d214bd32
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3992832
Reviewed-by: Eric Yilun Lin <yllin@google.com>
Commit-Queue: Ting Shen <phoenixshen@chromium.org>
Code-Coverage: Eric Yilun Lin <yllin@google.com>
Tested-by: Ting Shen <phoenixshen@chromium.org>
Diffstat (limited to 'power/mt8186.c')
-rw-r--r-- | power/mt8186.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/power/mt8186.c b/power/mt8186.c index b05700b599..723036a21f 100644 --- a/power/mt8186.c +++ b/power/mt8186.c @@ -290,6 +290,14 @@ enum power_state power_chipset_init(void) * the only way is to ask GPIO_AC_PRESENT directly. */ exit_hard_off = 0; + } else if (system_get_reset_flags() & EC_RESET_FLAG_AP_IDLE) { + if (init_state == POWER_S0) { + gpio_enable_interrupt(GPIO_AP_EC_WDTRST_L); + gpio_enable_interrupt(GPIO_AP_EC_WARM_RST_REQ); + disable_sleep(SLEEP_MASK_AP_RUN); + } + + return init_state; } if (battery_is_present() == BP_YES) |