mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-09 17:11:42 +00:00
Inhibit host interrupt for battery_key.
Battery key is used to signal to the host that USB charging status has changed. This virtual keystroke should not wake the device like physical keystroke does. Change still copies keystroke to the keyboard fifo but bypasses sending host interrupt. Signed-off-by: Todd Broch <tbroch@chromium.org> BRANCH=spring BUG=chrome-os-partner:18333 TEST=manual, Scenario1: suspend device then plug/unplug USB charging. Device doesn't wake. When resume 'cat /sys/class/power_supply/cros_ec-charger/online' is correct. Scenario2: while true ; do cat /sys/class/power_supply/cros_ec-charger/online done plug/unplug USB charging and device online status changes in a timely manner Change-Id: I8938798b30e70c0c5021405d4fc5da9ce398c311 Reviewed-on: https://gerrit.chromium.org/gerrit/47251 Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Tested-by: Todd Broch <tbroch@chromium.org> Commit-Queue: Todd Broch <tbroch@chromium.org>
This commit is contained in:
@@ -152,8 +152,9 @@ void keyboard_send_battery_key(void)
|
||||
memcpy(state, keyboard_scan_get_state(), sizeof(state));
|
||||
state[BATTERY_KEY_COL] ^= BATTERY_KEY_ROW_MASK;
|
||||
|
||||
/* Add to FIFO */
|
||||
keyboard_fifo_add(state);
|
||||
/* Add to FIFO only if AP is on or else it will wake from suspend */
|
||||
if (chipset_in_state(CHIPSET_STATE_ON))
|
||||
keyboard_fifo_add(state);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user