Skip to content

Commit 4fee1d4

Browse files
committed
Iris: fix FP pwrbtn stuck in hold state
if press FP at S5 until task PB status change to hold will stuck in hold and can't boot up because block by ingnore list, let tnext_state doing at outside to make sure release can be execute right and jump to next status. Signed-off-by: LeoCX_Tsai <[email protected]>
1 parent 02c300c commit 4fee1d4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

board/hx30/power_button_x86.c

Lines changed: 1 addition & 2 deletions
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)