diff options
author | Kevin K Wong <kevin.k.wong@intel.com> | 2016-06-10 17:17:36 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-06-13 15:56:13 -0700 |
commit | 2d98f64d71d4ff6f0509979894819d7c1f842086 (patch) | |
tree | d6689e80f41965ab672d9b56c40462c93a4b6bb8 /common | |
parent | 066bb6149d1440efe688d548dbc6bec539a39222 (diff) | |
download | chrome-ec-2d98f64d71d4ff6f0509979894819d7c1f842086.tar.gz |
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>
Diffstat (limited to 'common')
-rw-r--r-- | common/keyboard_scan.c | 1 |
1 files changed, 1 insertions, 0 deletions
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 |