Commit d35a0175 authored by Shelley Chen's avatar Shelley Chen Committed by chrome-bot
Browse files

Fizz: Recovery button support



Previous chromeboxes did not have an EC.  Adding
handling of recovery button event from EC.
Mapping recovery button to enter key, as it has
the same effect in depthcharge.

BUG=b:63893483
BRANCH=None
TEST=Start out with DUT in normal mode.
     Boot into recovery, ctrl-D, and press recovery button
     Make sure booting into dev mode

Change-Id: I9c525a53006176a1726f79a63a6b7bcd30f3d9a1
Signed-off-by: default avatarShelley Chen <shchen@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/581727

Reviewed-by: default avatarAaron Durbin <adurbin@chromium.org>
parent e54cc2d9
......@@ -26,6 +26,8 @@ CONFIG_DRIVER_BUS_I2C_DESIGNWARE_PCI=y
CONFIG_DRIVER_EC_CROS=y
CONFIG_DRIVER_EC_CROS_LPC=y
CONFIG_DRIVER_FLASH_MEMMAPPED=y
CONFIG_DRIVER_INPUT_MKBP=y
CONFIG_DRIVER_INPUT_MKBP_KEYMATRIX_STANDARD=y
CONFIG_DRIVER_INPUT_USB=y
CONFIG_DRIVER_BUS_SPI_INTEL_GSPI=y
CONFIG_DRIVER_POWER_PCH=y
......
......@@ -2773,6 +2773,7 @@ struct __ec_align1 ec_response_get_next_event {
#define EC_MKBP_POWER_BUTTON 0
#define EC_MKBP_VOL_UP 1
#define EC_MKBP_VOL_DOWN 2
#define EC_MKBP_RECOVERY 3
/* Switches */
#define EC_MKBP_LID_OPEN 0
......
......@@ -188,6 +188,9 @@ static int read_scancodes(Modifier *modifiers, uint16_t *codes, int max_codes)
if (pressed_buttons & (1 << EC_MKBP_VOL_DOWN))
add_button_code(keys, &total, max_codes,
EC_MKBP_VOL_DOWN);
if (pressed_buttons & (1 << EC_MKBP_RECOVERY))
add_button_code(keys, &total, max_codes,
EC_MKBP_RECOVERY);
changed = !!total;
}
......
......@@ -74,7 +74,8 @@ static uint16_t *scancode_rows[] = {
static uint16_t button_scancodes[] = {
0xe037, /* Power */
0xe021, /* Volume Down */
0xe032 /* Volume Up */
0xe032, /* Volume Up */
0x001c /* Recovery - Use same code as enter key */
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment