rush: Fix recovery mode switch function
BUG=chrome-os-partner:31032 BRANCH=None TEST=Compiles successfully Change-Id: I97da77c4f2ec3934066916c62491335a6536a85c Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://chromium-review.googlesource.com/210435 Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Commit-Queue: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Tom Warren <twarren@nvidia.com>
This commit is contained in:
parent
5447adb964
commit
d7ba56b245
1 changed files with 6 additions and 2 deletions
|
|
@ -45,7 +45,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++;
|
||||
|
|
@ -86,7 +86,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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue