summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2018-09-05 17:40:25 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-09-07 18:36:56 -0700
commit3bea5b5333314bd9f9c5e9c40f218e8df3a92e4b (patch)
tree2ed86b5ba565db0ce921c7051476fceae74bc84c
parent37809307f7b3422d8488feb0c4806615e6af72af (diff)
downloadchrome-ec-3bea5b5333314bd9f9c5e9c40f218e8df3a92e4b.tar.gz
keyboard: Ignore refresh button at boot
Any buttons except esc, left-shift, and down-arrow are considered as 'other key' and can cancel recovery mode entry if it's pressed at boot. On some chromebooks (e.g. Grunt, Nami), the refresh key is not scanned early enough (i.e. before the power button is released). Thus, the refresh key unintentionally cancels recovery mode entry. This change makes the EC ignore the refresh key at boot. This is already done for Grunt using CONFIG_KEYBOARD_IGNORE_REFRESH_BOOT_KEY. Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> BUG=b:114134666 BRANCH=none TEST=Put Akali in recovery mode without holding power button long. Change-Id: I57d7cb8fb320a4960125cd96d4d3ae84687a74df Reviewed-on: https://chromium-review.googlesource.com/1208229 Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r--baseboard/grunt/baseboard.h1
-rw-r--r--common/keyboard_scan.c2
-rw-r--r--include/config.h3
3 files changed, 0 insertions, 6 deletions
diff --git a/baseboard/grunt/baseboard.h b/baseboard/grunt/baseboard.h
index b1ff7c53c2..0a3bce9824 100644
--- a/baseboard/grunt/baseboard.h
+++ b/baseboard/grunt/baseboard.h
@@ -102,7 +102,6 @@
#define CONFIG_KEYBOARD_COL2_INVERTED
#define CONFIG_KEYBOARD_PROTOCOL_8042
#define CONFIG_KEYBOARD_REFRESH_ROW3
-#define CONFIG_KEYBOARD_IGNORE_REFRESH_BOOT_KEY
#define CONFIG_KEYBOARD_PWRBTN_ASSERTS_KSI3
#define CONFIG_USB_POWER_DELIVERY
diff --git a/common/keyboard_scan.c b/common/keyboard_scan.c
index 02a1c105a0..034b82519c 100644
--- a/common/keyboard_scan.c
+++ b/common/keyboard_scan.c
@@ -590,9 +590,7 @@ static uint32_t check_key_list(const uint8_t *state)
curr_state[c] &= ~KEYBOARD_MASK_PWRBTN;
#endif
-#ifdef CONFIG_KEYBOARD_IGNORE_REFRESH_BOOT_KEY
curr_state[KEYBOARD_COL_REFRESH] &= ~KEYBOARD_MASK_REFRESH;
-#endif
/* Update mask with all boot keys that were pressed. */
k = boot_key_list;
diff --git a/include/config.h b/include/config.h
index 82ba112171..b4e2935bd8 100644
--- a/include/config.h
+++ b/include/config.h
@@ -2035,9 +2035,6 @@
#undef CONFIG_KEYBOARD_PWRBTN_ASSERTS_KSI2
#undef CONFIG_KEYBOARD_PWRBTN_ASSERTS_KSI3
-/* Some boards see the refresh key pressed on boot when triggering recovery. */
-#undef CONFIG_KEYBOARD_IGNORE_REFRESH_BOOT_KEY
-
/* Enable extra debugging output from keyboard modules */
#undef CONFIG_KEYBOARD_DEBUG