summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@google.com>2018-03-23 22:33:17 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2018-03-27 18:22:47 +0000
commitd22019b1d4c2d82f6cd4aaa17f88ba68ee1698d7 (patch)
tree01750920c82edb82f5f969c62faa894c308372a0
parent1376cb1ade469eaed706eecf31b1e42742a4aec2 (diff)
downloadchrome-ec-d22019b1d4c2d82f6cd4aaa17f88ba68ee1698d7.tar.gz
keyboard: Add config option for refresh key row
The keyboards that have an assistant key also move the row that the refresh key is on from 2 to 3. The row is hardcoded and used by the early boot key detection code to determine if boot keys should be honored. The fallout from not having the right refresh row defined was not seen on Eve because that board has a different quirk where it does not distinguish reset-pin vs power-on reset types so the test in check_boot_keys() was not failing. BUG=none BRANCH=none TEST=manual testing on Eve board Change-Id: I5b94b4e32024afa1768bdf371a7eb951753014e8 Signed-off-by: Duncan Laurie <dlaurie@google.com> Reviewed-on: https://chromium-review.googlesource.com/979574 Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/982339 Commit-Queue: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Trybot-Ready: Furquan Shaikh <furquan@chromium.org>
-rw-r--r--board/eve/board.h1
-rw-r--r--include/config.h7
-rw-r--r--include/keyboard_config.h4
3 files changed, 12 insertions, 0 deletions
diff --git a/board/eve/board.h b/board/eve/board.h
index 44af362d22..2f843e96c2 100644
--- a/board/eve/board.h
+++ b/board/eve/board.h
@@ -72,6 +72,7 @@
#define CONFIG_KEYBOARD_BOARD_CONFIG
#define CONFIG_KEYBOARD_COL2_INVERTED
#define CONFIG_KEYBOARD_PROTOCOL_8042
+#define CONFIG_KEYBOARD_REFRESH_ROW3
#define CONFIG_KEYBOARD_SCANCODE_MUTABLE
#define CONFIG_TABLET_MODE
diff --git a/include/config.h b/include/config.h
index 6b884a8948..c163ee5bb5 100644
--- a/include/config.h
+++ b/include/config.h
@@ -1831,6 +1831,13 @@
#undef CONFIG_KEYBOARD_COL2_INVERTED
/*
+ * Keyboards with the assistant key also move the refresh key matrix to row 3
+ * instead of row 2. This is used by the boot key detection code to determine
+ * if the refresh key is held down at boot.
+ */
+#undef CONFIG_KEYBOARD_REFRESH_ROW3
+
+/*
* Config KSO to start from a different KSO pin. This is to allow some chips
* to use alternate functions on KSO pins.
*/
diff --git a/include/keyboard_config.h b/include/keyboard_config.h
index 6e6fcef7f8..b4aa21ad99 100644
--- a/include/keyboard_config.h
+++ b/include/keyboard_config.h
@@ -33,7 +33,11 @@
#define KEYBOARD_ROW_LEFT_ALT 6
#define KEYBOARD_MASK_LEFT_ALT KEYBOARD_ROW_TO_MASK(KEYBOARD_ROW_LEFT_ALT)
#define KEYBOARD_COL_REFRESH 2
+#ifdef CONFIG_KEYBOARD_REFRESH_ROW3
+#define KEYBOARD_ROW_REFRESH 3
+#else
#define KEYBOARD_ROW_REFRESH 2
+#endif
#define KEYBOARD_MASK_REFRESH KEYBOARD_ROW_TO_MASK(KEYBOARD_ROW_REFRESH)
#define KEYBOARD_COL_RIGHT_ALT 10
#define KEYBOARD_ROW_RIGHT_ALT 0