From 3968c95e124c6a84ef57881a2058db3b754ab365 Mon Sep 17 00:00:00 2001 From: Furquan Shaikh Date: Thu, 20 Jul 2017 15:03:32 -0700 Subject: button: Add recovery button to mkbp button state Pass in recovery button press/release information to AP using MKBP button driver. BUG=b:63893483 BRANCH=None TEST=Behavior verified by Shelley. Change-Id: I7a6e50ec8595d99327b5fc8e822bf762e0ce13e0 Signed-off-by: Furquan Shaikh Reviewed-on: https://chromium-review.googlesource.com/580539 Reviewed-by: Aaron Durbin --- common/keyboard_mkbp.c | 5 +++++ include/ec_commands.h | 1 + 2 files changed, 6 insertions(+) diff --git a/common/keyboard_mkbp.c b/common/keyboard_mkbp.c index e6d06c30fb..db15522534 100644 --- a/common/keyboard_mkbp.c +++ b/common/keyboard_mkbp.c @@ -247,6 +247,11 @@ void keyboard_update_button(enum keyboard_button_type button, int is_pressed) mkbp_button_state |= (is_pressed << EC_MKBP_VOL_DOWN); break; + case KEYBOARD_BUTTON_RECOVERY: + mkbp_button_state &= ~(1 << EC_MKBP_RECOVERY); + mkbp_button_state |= (is_pressed << EC_MKBP_RECOVERY); + break; + default: /* ignored. */ return; diff --git a/include/ec_commands.h b/include/ec_commands.h index ea2f9a6213..68ba1df59f 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -2957,6 +2957,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 -- cgit v1.2.1