mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-09 17:11:42 +00:00
Fixing bug: Keyboard locks up after 8s pwr press
The EC was not re-enabling keyboard scanning on boot if the power button was released. This works fine if the power button is released before the shutdown is complete, but if the user holds it down until the device is completed powered down the lock will never be released, and the next time they turn on the computer, the keyboard won't work. To fix this, all that is needed is to make the power event task keep unlocking it whenever the power button isn't pressed down. There's no problem with unlocking multiple times, so it's not dangerous to do this. BUG=chrome-os-partner:12070 TEST=Boot the machine normally, then press and hold the power button until the machine is entirely powered down before releasing it. Press the power button a second time to turn on the machine. You should be able to type as normal. Change-Id: I88852ed228bd8f6a9446406bab642812ef1327db Signed-off-by: Charlie Mooney <charliemooney@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/28871 Reviewed-by: David Hendricks <dhendrix@chromium.org>
This commit is contained in:
@@ -175,7 +175,7 @@ static int check_for_power_off_event(void)
|
||||
}
|
||||
|
||||
/* Dis/Enable keyboard scanning when the power button state changes */
|
||||
if (pressed != power_button_was_pressed)
|
||||
if (!pressed || pressed != power_button_was_pressed)
|
||||
keyboard_enable_scanning(!pressed);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user