Skip to content

Commit fd2a203

Browse files
authored
Merge pull request #625 from FrameworkComputer/hx30.PB_behavior
Iris: fix FP pwrbtn stuck in hold state
2 parents 02c300c + 4fee1d4 commit fd2a203

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

board/hx30/power_button_x86.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -444,16 +444,15 @@ static void state_machine(uint64_t tnow)
444444
case PWRBTN_STATE_HELD:
445445

446446
if (power_button_is_pressed()) {
447+
tnext_state = tnow + PWRBTN_WAIT_HOLD;
447448
if (!gpio_get_level(GPIO_ON_OFF_FP_L)) {
448-
tnext_state = tnow + PWRBTN_WAIT_HOLD;
449449
if (++hold_check < PWRBTN_FP_HOLD_COUNT)
450450
break;
451451

452452
hold_check = 0;
453453
tnext_state = tnow + PWRBTN_STATE_DELAY;
454454
pwrbtn_state = PWRBTN_STATE_NEED_SHUTDOWN;
455455
} else if (!gpio_get_level(GPIO_ON_OFF_BTN_L)) {
456-
tnext_state = tnow + PWRBTN_WAIT_HOLD;
457456
if (++hold_check < PWRBTN_HOLD_COUNT)
458457
break;
459458

0 commit comments

Comments
 (0)