File tree Expand file tree Collapse file tree
zephyr/program/lotus/azalea/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -212,6 +212,18 @@ static void set_initial_pwrbtn_state(void)
212212 CPRINTS ("PB init-on after updating firmware" );
213213 } else if (((reset_flags & EC_RESET_FLAG_HIBERNATE ) == EC_RESET_FLAG_HIBERNATE ) &&
214214 (gpio_pin_get_dt (GPIO_DT_FROM_NODELABEL (gpio_hw_acav_in )) == 0 )) {
215+ /**
216+ * If EC wake from power button and the power button already release.
217+ * check the chassis status and standalone mode status.
218+ */
219+ if ((gpio_pin_get_dt (GPIO_DT_FROM_NODELABEL (gpio_chassis_open_l )) == 0 ) &&
220+ (gpio_pin_get_dt (GPIO_DT_FROM_NODELABEL (gpio_on_off_btn_l )) == 1 ) &&
221+ !get_standalone_mode ()) {
222+ pwrbtn_state = PWRBTN_STATE_IDLE ;
223+ CPRINTS ("PB ignore signal" );
224+ return ;
225+ }
226+
215227 /**
216228 * EC needs to auto power on after exiting the hibernate mode w/o external power
217229 */
@@ -439,7 +451,7 @@ static void powerbtn_x86_init(void)
439451{
440452 set_initial_pwrbtn_state ();
441453}
442- DECLARE_HOOK (HOOK_INIT , powerbtn_x86_init , HOOK_PRIO_DEFAULT + 1 );
454+ DECLARE_HOOK (HOOK_INIT , powerbtn_x86_init , HOOK_PRIO_DEFAULT + 2 );
443455
444456void chipset_power_on (void )
445457{
You can’t perform that action at this time.
0 commit comments