From 00682eb80fe159c1d037c721f2dd15c1be44bd12 Mon Sep 17 00:00:00 2001 From: Randall Spangler Date: Fri, 1 Nov 2013 10:15:48 -0700 Subject: cleanup: Still more TODO comments More of same. Comment changes only; no code changes. BUG=chrome-os-partner:18343 BRANCH=none TEST=build all platforms; pass unit tests Change-Id: I8c42ed7d332cd9d461067e1aeac670855106cbcd Signed-off-by: Randall Spangler Reviewed-on: https://chromium-review.googlesource.com/175405 Reviewed-by: Bill Richardson --- common/power_button_x86.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'common/power_button_x86.c') diff --git a/common/power_button_x86.c b/common/power_button_x86.c index e37fb6f81f..c8854e99fe 100644 --- a/common/power_button_x86.c +++ b/common/power_button_x86.c @@ -26,8 +26,21 @@ #define CPRINTF(format, args...) cprintf(CC_SWITCH, format, ## args) /* - * When chipset is on, we stretch the power button signal to it so chipset - * hard-reset is triggered at ~8 sec, not ~4 sec: + * x86 chipsets have a hardware timer on the power button input which causes + * them to reset when the button is pressed for more than 4 seconds. This is + * problematic for Chrome OS, which needs more time than that to transition + * through the lock and logout screens. So when the system is on, we need to + * stretch the power button signal so that the chipset will hard-reboot after 8 + * seconds instead of 4. + * + * When the button is pressed, we initially send a short pulse (t0); this + * allows the chipset to process its initial power button interrupt and do + * things like wake from suspend. We then deassert the power button signal to + * the chipset for (t1 = 4 sec - t0), which keeps the chipset from starting its + * hard reset timer. If the power button is still pressed after this period, + * we again assert the power button signal for the remainder of the press + * duration. Since (t0+t1) causes a 4-second offset, the hard reset timeout in + * the chipset triggers after 8 seconds as desired. * * PWRBTN# --- ---- * to EC |______________________| @@ -41,7 +54,6 @@ * to host v v * @S0 make code break code */ -/* TODO: link to full power button / lid switch state machine description. */ #define PWRBTN_DELAY_T0 (32 * MSEC) /* 32ms (PCH requires >16ms) */ #define PWRBTN_DELAY_T1 (4 * SECOND - PWRBTN_DELAY_T0) /* 4 secs - t0 */ /* -- cgit v1.2.1