summaryrefslogtreecommitdiff
path: root/common/keyboard_scan.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/keyboard_scan.c')
-rw-r--r--common/keyboard_scan.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/common/keyboard_scan.c b/common/keyboard_scan.c
index 2b7e15b1b2..d11d40af21 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"
@@ -578,6 +579,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 */