diff options
author | Aseda Aboagye <aaboagye@google.com> | 2019-07-31 10:48:36 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-08-01 01:12:33 +0000 |
commit | dbe44d30babbd6f3856f379f3808603c2615afe9 (patch) | |
tree | e5417a6c1e3f058a6f3acfc482561dd9f8d824ce | |
parent | 09d4632e694ab69c1785fdad910025990a37f15d (diff) | |
download | chrome-ec-dbe44d30babbd6f3856f379f3808603c2615afe9.tar.gz |
mkbp_event: Only notify MKBP via hostevent in suspend
If a board is using CONFIG_MKBP_USE_GPIO_AND_HOST_EVENT, make sure that
the MKBP event notiification via host event only occurs in suspend.
Since MKBP events are a part of the
HOST_EVENT_ALWAYS_REPORT_DEFAULT_MASK, an MKBP host event could still be
set in S0, but it will not trigger an SCI since the event is not in the
SCI mask. This would cause the board to prematurely wake up when
suspending due to the lingering event.
BUG=none
BRANCH=none
TEST=Flash nocturne, boot to S0, suspend, verify that no spurious
wakeups occur.
Change-Id: I2e3196e836934d87d1d5efefff26f58c9e2bc3b2
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1728039
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Auto-Submit: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Ravi Chandra Sadineni <ravisadineni@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
-rw-r--r-- | common/mkbp_event.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/common/mkbp_event.c b/common/mkbp_event.c index deeee8cb93..12a439241b 100644 --- a/common/mkbp_event.c +++ b/common/mkbp_event.c @@ -99,11 +99,14 @@ static int mkbp_set_host_active_via_gpio(int active, uint32_t *timestamp) #ifdef CONFIG_MKBP_USE_GPIO_AND_HOST_EVENT /* * In case EC_INT_L is not a wake pin, make sure that we also attempt to - * wake the AP via a host event. If MKBP events are masked thru the - * host event interface in S0, no ill effects should occur as the - * notification will only be received via the GPIO. + * wake the AP via a host event. Only use this second notification + * interface in suspend since MKBP events are a part of the + * HOST_EVENT_ALWAYS_REPORT_DEFAULT_MASK. This can cause an MKBP host + * event to be set in S0, but not triggering an SCI since the event is + * not in the SCI mask. This would also cause the board to prematurely + * wake up when suspending due to the lingering event. */ - if (active) + if (active && chipset_in_state(CHIPSET_STATE_ANY_SUSPEND)) host_set_single_event(EC_HOST_EVENT_MKBP); #endif /* CONFIG_MKBP_USE_GPIO_AND_HOST_EVENT */ |