summaryrefslogtreecommitdiff
path: root/include/keyboard_config.h
diff options
context:
space:
mode:
authorEdward Hill <ecgh@chromium.org>2018-05-16 17:28:27 -0600
committerchrome-bot <chrome-bot@chromium.org>2018-05-16 22:49:42 -0700
commited45aba4bd123325ea8c97220c5f45ed2326b311 (patch)
tree3a495125130e88282131b18f82d7e7796fe40517 /include/keyboard_config.h
parent0f41a73dbf9ac5ec569ab53600b7b8e95453a284 (diff)
downloadchrome-ec-ed45aba4bd123325ea8c97220c5f45ed2326b311.tar.gz
keyboard_scan: Add refresh and power button boot key options
Make Esc+Refresh+Power on Grunt enter Recovery Mode. If Power is released fast: [0.045303 KB init state: -- 02 08 -- -- -- -- -- -- -- -- -- --] Add CONFIG_KEYBOARD_IGNORE_REFRESH_BOOT_KEY to handle this case. If Power is held longer: [0.045448 KB init state: 08 0a 08 08 08 -- 08 -- 08 08 -- 08 08] Add CONFIG_KEYBOARD_PWRBTN_ASSERTS_KSI3 to handle this case. BUG=b:79758966 BRANCH=none TEST=Esc+Refresh+Power gives recovery screen on Grunt Change-Id: I43a7d485535ff7b0d9bfce59f28c0049ee989818 Signed-off-by: Edward Hill <ecgh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1063032 Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Diffstat (limited to 'include/keyboard_config.h')
-rw-r--r--include/keyboard_config.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/keyboard_config.h b/include/keyboard_config.h
index b4aa21ad99..f338d63c7f 100644
--- a/include/keyboard_config.h
+++ b/include/keyboard_config.h
@@ -63,9 +63,13 @@
#define KEYBOARD_COL_KEY_2 4
#define KEYBOARD_ROW_KEY_2 6
#define KEYBOARD_MASK_KEY_2 KEYBOARD_ROW_TO_MASK(KEYBOARD_ROW_KEY_2)
-#define KEYBOARD_MASK_KSI2 KEYBOARD_ROW_TO_MASK(2)
#define KEYBOARD_COL_LEFT_SHIFT 7
#define KEYBOARD_ROW_LEFT_SHIFT 5
#define KEYBOARD_MASK_LEFT_SHIFT KEYBOARD_ROW_TO_MASK(KEYBOARD_ROW_LEFT_SHIFT)
+#ifdef CONFIG_KEYBOARD_PWRBTN_ASSERTS_KSI2
+#define KEYBOARD_MASK_PWRBTN KEYBOARD_ROW_TO_MASK(2)
+#elif defined(CONFIG_KEYBOARD_PWRBTN_ASSERTS_KSI3)
+#define KEYBOARD_MASK_PWRBTN KEYBOARD_ROW_TO_MASK(3)
+#endif
#endif /* __CROS_EC_KEYBOARD_CONFIG_H */