diff options
author | Louis Yung-Chieh Lo <yjlou@chromium.org> | 2011-12-30 11:54:38 +0800 |
---|---|---|
committer | Louis Yung-Chieh Lo <yjlou@chromium.org> | 2011-12-30 16:38:16 +0800 |
commit | 6fc214c1e3803703289d62be13e887d2b581fa8e (patch) | |
tree | 1f4ef6dad2ed40b66b5902c17caace64d94b546a /test | |
parent | c425568c40d2f953b065ca0177c970a1b43554a1 (diff) | |
download | chrome-ec-6fc214c1e3803703289d62be13e887d2b581fa8e.tar.gz |
Implement power button behavior.
Implement the state machine for PWRBTN# input and output to PCH. The state
begins while power button is pressed and stops while it is released or 8 secs
pass. The state machine is maintained inside the infinite loop of gpio_task().
Remember to #define EVT after the board comes back.
Also, the power-up sequence is not completed yet. Remember to come back when
it is done. Search TODO in code.
BUG=none
TEST=Manual run on evaluation board (via console printf):
#---------------------------
# power button pressed and release after 8s
[3070341] New State: START next_ts:3070340
# wait for next pwrbtn_sm_handle() is run.
[3071428] set_pwrbtn_to_pch(LOW)
[3071482] New State: T0 next_ts:3103426
[3103963] set_pwrbtn_to_pch(HIGH)
[3104023] New State: T1 next_ts:7071961
[7072044] set_pwrbtn_to_pch(LOW)
[7072103] New State: T2 next_ts:11072042
[11072661] set_pwrbtn_to_pch(HIGH)
[11072723] New State: STOPPED next_ts:11072042
# power button released
[14336515] New State: STOPPING next_ts:14336514
[14337604] set_pwrbtn_to_pch(HIGH)
[14337662] New State: SOPPED next_ts:14336514
#---------------------------
# Power button released during T1
[378324436] New State: START next_ts:378324435
[378325530] set_pwrbtn_to_pch(LOW)
[378325589] New State: T0 next_ts:378357528
[378358080] set_pwrbtn_to_pch(HIGH)
[378358143] New State: T1 next_ts:382326078
[378889269] New State: STOPPING next_ts:378889268
[378890361] set_pwrbtn_to_pch(HIGH)
[378890420] New State: STOPPED next_ts:378889268
#---------------------------
# Power button released during T2
[448592391] New State: START next_ts:448592390
[448593483] set_pwrbtn_to_pch(LOW)
[448593542] New State: T0 next_ts:448625481
[448626041] set_pwrbtn_to_pch(HIGH)
[448626104] New State: T1 next_ts:452594039
[452594076] set_pwrbtn_to_pch(LOW)
[452594138] New State: T2 next_ts:456594074
[453199165] New State: STOPPING next_ts:453199164
[453200257] set_pwrbtn_to_pch(HIGH)
[453200316] New State: STOPPED next_ts:453199164
Change-Id: I5a12f3e46fa8086c530123a81ee743d3664b91f4
Diffstat (limited to 'test')
0 files changed, 0 insertions, 0 deletions