summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2012-06-06 13:32:37 -0700
committerGerrit <chrome-bot@google.com>2012-06-07 09:59:55 -0700
commitd9c385da744d46ca25e87e70ef8e4e1c46b71ae6 (patch)
tree286b586100073518ba77e784bd96f3c39276e02a
parentb804daf6510c79fe3ce1de3f029ab4fe97c27152 (diff)
downloadchrome-ec-d9c385da744d46ca25e87e70ef8e4e1c46b71ae6.tar.gz
Fix detecting boot keys on EVT
EVT uses power+refresh as the Silego combination not power+esc, so holding down power+esc+D wouldn't turn on the fake dev switch, and holding down power+refresh+D wouldn't either because on a short enough tap the EC would measure refresh as still held down. BUG=chrome-os-partner:10210 TEST=manual 1) hold down reset combo + D -> turns on fake dev mode 2) hold down reset combo + F -> turns off fake dev mode Change-Id: I85b51d3684500ae821513e71a2cd01aa4fcf5e8f Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/24646
-rw-r--r--chip/lm4/keyboard_scan.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/chip/lm4/keyboard_scan.c b/chip/lm4/keyboard_scan.c
index 1e239832e7..5a68639103 100644
--- a/chip/lm4/keyboard_scan.c
+++ b/chip/lm4/keyboard_scan.c
@@ -263,9 +263,12 @@ static int check_boot_key(int index, int mask)
* your keyboard. Currently, only the requested key and the keys used
* for the Silego reset are allowed. */
allowed_mask[index] |= mask;
- /* TODO: (crosbug.com/p/10210) this is correct for proto1, but EVT+
- * uses Refresh as the reset key. */
- allowed_mask[MASK_INDEX_ESC] |= MASK_VALUE_ESC;
+
+ /* TODO: (crosbug.com/p/9561) remove once proto1 obsolete */
+ if (system_get_board_version() == BOARD_VERSION_PROTO1)
+ allowed_mask[MASK_INDEX_ESC] |= MASK_VALUE_ESC;
+ else
+ allowed_mask[MASK_INDEX_REFRESH] |= MASK_VALUE_REFRESH;
for (c = 0; c < KB_COLS; c++) {
if (raw_state_at_boot[c] & ~allowed_mask[c])