mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-12 19:04:59 +00:00
yorp: implement late hibernate call
Implement board_hibernate_late function to turn off the LED's. BUG=b:110057984 BRANCH=NONE TEST=On Yorp board, enter hibernate mode through key combination "Alt H Vol Up" , observe that LED is turned off. Change-Id: Idb412cbbbb549c54b449cd4571226e284dd88e6a Signed-off-by: Jagadish Krishnamoorthy <jagadish.krishnamoorthy@intel.com> Reviewed-on: https://chromium-review.googlesource.com/1096665 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Vijay Hiremath <vijay.p.hiremath@intel.corp-partner.google.com>
This commit is contained in:
committed by
chrome-bot
parent
d165b02300
commit
6476093cea
@@ -289,6 +289,20 @@ static void board_init(void)
|
||||
}
|
||||
DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT);
|
||||
|
||||
void board_hibernate_late(void) {
|
||||
|
||||
int i;
|
||||
|
||||
const uint32_t hibernate_pins[][2] = {
|
||||
/* Turn off LEDs before going to hibernate */
|
||||
{GPIO_BAT_LED_BLUE_L, GPIO_INPUT | GPIO_PULL_UP},
|
||||
{GPIO_BAT_LED_ORANGE_L, GPIO_INPUT | GPIO_PULL_UP},
|
||||
};
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(hibernate_pins); ++i)
|
||||
gpio_set_flags(hibernate_pins[i][0], hibernate_pins[i][1]);
|
||||
}
|
||||
|
||||
#ifndef TEST_BUILD
|
||||
/* This callback disables keyboard when convertibles are fully open */
|
||||
void lid_angle_peripheral_enable(int enable)
|
||||
|
||||
Reference in New Issue
Block a user