From 2d98f64d71d4ff6f0509979894819d7c1f842086 Mon Sep 17 00:00:00 2001 From: Kevin K Wong Date: Fri, 10 Jun 2016 17:17:36 -0700 Subject: lid_switch: disable keyboard scan based on the initial lid state If the lid is initially closed, keyboard scan should be disabled. BUG=chrome-os-partner:53566 BRANCH=none TEST=Check ESC+Refresh+PwrBtn is detected. Check keyscan is enabled if lid is open. Check keyscan is disabled if lid is closed. Check power button is functional if lid is opened. Check power button is masked if lid is closed. Change-Id: I2354a657d8bf0c13207517cc789547a68befd240 Signed-off-by: Kevin K Wong Reviewed-on: https://chromium-review.googlesource.com/351534 Reviewed-by: Shawn N --- common/keyboard_scan.c | 1 + 1 file changed, 1 insertion(+) (limited to 'common') diff --git a/common/keyboard_scan.c b/common/keyboard_scan.c index cf046b86e4..58fe77d677 100644 --- a/common/keyboard_scan.c +++ b/common/keyboard_scan.c @@ -723,6 +723,7 @@ static void keyboard_lid_change(void) keyboard_scan_enable(0, KB_SCAN_DISABLE_LID_CLOSED); } DECLARE_HOOK(HOOK_LID_CHANGE, keyboard_lid_change, HOOK_PRIO_DEFAULT); +DECLARE_HOOK(HOOK_INIT, keyboard_lid_change, HOOK_PRIO_INIT_LID + 1); #endif -- cgit v1.2.1