mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-02 13:14:51 +00:00
ryu: detect recovery mode and set proper event
When the power button, volume up, and volume down buttons are pressed during boot indicate to the AP that recovery mode is enabled. BUG=chrome-os-partner:31481 BRANCH=None TEST=Benson tested this w/ his magic cables. Change-Id: I2f285d6b8b71708eff53e8b46020e51c96f281a4 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/213299 Reviewed-by: Alec Berg <alecaberg@chromium.org>
This commit is contained in:
committed by
chrome-internal-fetch
parent
97a4fd2751
commit
0539cc2ed5
@@ -12,6 +12,7 @@
|
||||
#include "console.h"
|
||||
#include "gpio.h"
|
||||
#include "hooks.h"
|
||||
#include "host_command.h"
|
||||
#include "i2c.h"
|
||||
#include "power.h"
|
||||
#include "power_button.h"
|
||||
@@ -37,6 +38,15 @@ void unhandled_evt(enum gpio_signal signal)
|
||||
/* Initialize board. */
|
||||
static void board_init(void)
|
||||
{
|
||||
/*
|
||||
* Determine recovery mode is requested by the power, volup, and
|
||||
* voldown buttons being pressed.
|
||||
*/
|
||||
if (power_button_signal_asserted() &&
|
||||
!gpio_get_level(GPIO_BTN_VOLD_L) &&
|
||||
!gpio_get_level(GPIO_BTN_VOLU_L))
|
||||
host_set_single_event(EC_HOST_EVENT_KEYBOARD_RECOVERY);
|
||||
|
||||
/*
|
||||
* Enable CC lines after all GPIO have been initialized. Note, it is
|
||||
* important that this is enabled after the CC_DEVICE_ODL lines are
|
||||
|
||||
Reference in New Issue
Block a user