mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-29 01:50:53 +00:00
power_button_x86: Honor power_button_pulse setting on sysjump
On sysjump, if power button is held down, first check power_button_pulse_enabled setting to decide if powerbtn to pch should be asserted. This is important to prevent accidental shutdowns when user is attempting to do an EC reset with Vup+Pwr held down. BUG=b:73129177 BRANCH=None TEST=Verified following: 1. Reset EC by holding Vup+Pwr. 2. Keep holding Vup+Pwr until AP reaches depthcharge. 3. Ensure that AP does not shutdown. Change-Id: I0375fc8e8baabb40807dfdc6d4c9fa70c9b3b87d Signed-off-by: Furquan Shaikh <furquan@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/912364 Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
committed by
chrome-bot
parent
242cd4e3ad
commit
c7f6e2a80f
@@ -204,9 +204,14 @@ static void set_initial_pwrbtn_state(void)
|
||||
chipset_in_state(CHIPSET_STATE_ON)) {
|
||||
/*
|
||||
* Jumped to this image while the chipset was already on, so
|
||||
* simply reflect the actual power button state.
|
||||
* simply reflect the actual power button state unless power
|
||||
* button pulse is disabled. If power button SMI pulse is
|
||||
* enabled, then it should be honored, else setting power
|
||||
* button to PCH could lead to x86 platform shutting down. If
|
||||
* power button is still held by the time control reaches
|
||||
* state_machine(), it would take the appropriate action there.
|
||||
*/
|
||||
if (power_button_is_pressed()) {
|
||||
if (power_button_is_pressed() && power_button_pulse_enabled) {
|
||||
CPRINTS("PB init-jumped-held");
|
||||
set_pwrbtn_to_pch(0, 0);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user