mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-31 02:51:26 +00:00
eve: Fix corner case for trackpad wake
If we go to sleep with a lid close event, the trackpad is immediately waking the system. Since we don't want to accidentally wake if the trackpad got input while the lid is closed anyway this change will disable trackpad wake when the lid is closed. BUG=b:35587072 BRANCH=none TEST=manual testing on Eve P1b: 1) enter suspend by closing lid and ensure it stays in suspend 2) enter suspend by idle, and then close the lid, and ensure it stays suspended Change-Id: Ied73dde61e99231f057504ca56c473432aa30e4b Signed-off-by: Duncan Laurie <dlaurie@google.com> Reviewed-on: https://chromium-review.googlesource.com/457865 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Todd Broch <tbroch@chromium.org>
This commit is contained in:
committed by
chrome-bot
parent
d2fd876fa5
commit
7db12fdc3e
@@ -616,7 +616,7 @@ DECLARE_HOOK(HOOK_CHIPSET_SHUTDOWN, board_chipset_shutdown, HOOK_PRIO_DEFAULT);
|
||||
/* Called on AP S0 -> S3 transition */
|
||||
static void board_chipset_suspend(void)
|
||||
{
|
||||
if (!tablet_get_mode())
|
||||
if (!tablet_get_mode() && lid_is_open())
|
||||
trackpad_wake_enable(1);
|
||||
}
|
||||
DECLARE_HOOK(HOOK_CHIPSET_SUSPEND, board_chipset_suspend, HOOK_PRIO_DEFAULT);
|
||||
@@ -628,6 +628,14 @@ static void board_chipset_resume(void)
|
||||
}
|
||||
DECLARE_HOOK(HOOK_CHIPSET_RESUME, board_chipset_resume, HOOK_PRIO_DEFAULT);
|
||||
|
||||
/* Called on lid change */
|
||||
static void board_lid_change(void)
|
||||
{
|
||||
if (!lid_is_open())
|
||||
trackpad_wake_enable(0);
|
||||
}
|
||||
DECLARE_HOOK(HOOK_LID_CHANGE, board_lid_change, HOOK_PRIO_DEFAULT);
|
||||
|
||||
void board_hibernate_late(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
Reference in New Issue
Block a user