From d9c385da744d46ca25e87e70ef8e4e1c46b71ae6 Mon Sep 17 00:00:00 2001 From: Randall Spangler Date: Wed, 6 Jun 2012 13:32:37 -0700 Subject: [PATCH] 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 Reviewed-on: https://gerrit.chromium.org/gerrit/24646 --- chip/lm4/keyboard_scan.c | 9 ++++++--- 1 file 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])