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 <kevin.k.wong@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/351534
Reviewed-by: Shawn N <shawnn@chromium.org>
This commit is contained in:
Kevin K Wong
2016-06-10 17:17:36 -07:00
committed by chrome-bot
parent 066bb6149d
commit 2d98f64d71

View File

@@ -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