From e06771c74ebf3b307b6b8690c9c68233bbee14ac Mon Sep 17 00:00:00 2001 From: Furquan Shaikh Date: Tue, 29 Jul 2014 18:45:48 -0700 Subject: rush: Fix recovery mode switch function BUG=chrome-os-partner:31032 BRANCH=None TEST=Compiles successfully Change-Id: I5c9fa9e613cc24f3f9f17330c5453cdd4306b92a Signed-off-by: Patrick Georgi Original-Commit-Id: d7ba56b2459889ef24a9ce7331476c258c8b10d3 Original-Change-Id: I97da77c4f2ec3934066916c62491335a6536a85c Original-Signed-off-by: Furquan Shaikh Original-Reviewed-on: https://chromium-review.googlesource.com/210435 Original-Tested-by: Furquan Shaikh Original-Reviewed-by: Aaron Durbin Original-Commit-Queue: Furquan Shaikh Original-Reviewed-by: Tom Warren Reviewed-on: http://review.coreboot.org/8899 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- src/mainboard/google/rush/chromeos.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/mainboard') diff --git a/src/mainboard/google/rush/chromeos.c b/src/mainboard/google/rush/chromeos.c index 91cb9d8324..03908c0434 100644 --- a/src/mainboard/google/rush/chromeos.c +++ b/src/mainboard/google/rush/chromeos.c @@ -40,7 +40,7 @@ void fill_lb_gpios(struct lb_gpios *gpios) /* Recovery: active high */ gpios->gpios[count].port = -1; gpios->gpios[count].polarity = ACTIVE_HIGH; - gpios->gpios[count].value = 1; + gpios->gpios[count].value = get_recovery_mode_switch(); strncpy((char *)gpios->gpios[count].name, "recovery", GPIO_MAX_NAME_LENGTH); count++; @@ -81,7 +81,11 @@ int get_developer_mode_switch(void) int get_recovery_mode_switch(void) { - return 0; + uint32_t ec_events; + + ec_events = google_chromeec_get_events_b(); + return !!(ec_events & + EC_HOST_EVENT_MASK(EC_HOST_EVENT_KEYBOARD_RECOVERY)); } int get_write_protect_state(void) -- cgit v1.2.3