mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-17 10:31:31 +00:00
mkbp_event: Don't use memmap'd host event mask
Previously the memmap'd host event mask copy wasn't always updated. Be consistent with other mkbp code and call host_get_event() to get our current mask. BUG=chrome-os-partner:59241 BRANCH=gru TEST=Manual on kevin, close lid to suspend, press volume keys, verify device doesn't wake. Open lid, verify device wakes. Run 'powerd_dbus_suspend', press volume keys, verify device doesn't wake. Press keyboard key, verify device wakes. Change-Id: I3de49efa1ebc53a9c56bed57007c48356c7e97bb Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/406547 Reviewed-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> (cherry picked from commit 763d3b2c6f26d41e7147f860e59755af2fe87fe4) Reviewed-on: https://chromium-review.googlesource.com/407957 Commit-Ready: Douglas Anderson <dianders@chromium.org> Tested-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
This commit is contained in:
committed by
chrome-bot
parent
a750b1d6b1
commit
f7d5360449
@@ -67,13 +67,11 @@ void mkbp_send_event(uint8_t event_type)
|
||||
#ifdef CONFIG_MKBP_WAKEUP_MASK
|
||||
/* Only assert interrupt for wake events if host is sleeping */
|
||||
if (host_is_sleeping()) {
|
||||
uint32_t events;
|
||||
events = *(uint32_t *)host_get_memmap(EC_MEMMAP_HOST_EVENTS);
|
||||
/*
|
||||
* interrupt the AP if it is a wakeup event
|
||||
* which is defined in the white list.
|
||||
*/
|
||||
if ((events & CONFIG_MKBP_WAKEUP_MASK) ||
|
||||
if ((host_get_events() & CONFIG_MKBP_WAKEUP_MASK) ||
|
||||
(event_type == EC_MKBP_EVENT_KEY_MATRIX))
|
||||
set_host_interrupt(1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user