mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-10 17:41:54 +00:00
Add Alt+VolUp+H key combo to hibernate system
This is needed for testing wake-from-hibernate. BUG=chrome-os-partner:13680 BRANCH=link (if needed for factory, else none) TEST=manual 1. Boot system. 2. alt+volup+h. System hibernates (unless you've got hardware issue 13680) 3. Press power button. System wakes. Change-Id: I66e1299a948bffe22c10863a4ffbe5c507e2c5dd Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/32442 Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -68,6 +68,8 @@ static const uint8_t actual_key_masks[4][KB_COLS] = {
|
||||
#define MASK_VALUE_LEFT_ALT 0x40
|
||||
#define MASK_INDEX_KEY_R 3
|
||||
#define MASK_VALUE_KEY_R 0x80
|
||||
#define MASK_INDEX_KEY_H 6
|
||||
#define MASK_VALUE_KEY_H 0x02
|
||||
|
||||
static void wait_for_interrupt(void)
|
||||
{
|
||||
@@ -163,6 +165,10 @@ static void check_runtime_keys(void)
|
||||
/* R = reboot */
|
||||
CPRINTF("[%T KB warm reboot]\n");
|
||||
x86_power_reset(0);
|
||||
} else if (raw_state[MASK_INDEX_KEY_H] == MASK_VALUE_KEY_H) {
|
||||
/* H = hibernate */
|
||||
CPRINTF("[%T KB hibernate]\n");
|
||||
system_hibernate(0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user