diff options
Diffstat (limited to 'common/keyboard_scan.c')
-rw-r--r-- | common/keyboard_scan.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/common/keyboard_scan.c b/common/keyboard_scan.c index 76db0b58f9..7685293a47 100644 --- a/common/keyboard_scan.c +++ b/common/keyboard_scan.c @@ -8,6 +8,7 @@ #include "chipset.h" #include "common.h" #include "console.h" +#include "hooks.h" #include "host_command.h" #include "keyboard_config.h" #include "keyboard_protocol.h" @@ -555,6 +556,18 @@ void keyboard_scan_enable(int enable) } } +#ifdef CONFIG_LID_SWITCH + +static void keyboard_lid_change(void) +{ + /* If lid is open, wake the keyboard task */ + if (lid_is_open()) + task_wake(TASK_ID_KEYSCAN); +} +DECLARE_HOOK(HOOK_LID_CHANGE, keyboard_lid_change, HOOK_PRIO_DEFAULT); + +#endif + /*****************************************************************************/ /* Host commands */ |