summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlec Berg <alecaberg@chromium.org>2013-10-09 16:05:24 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-02-13 21:57:49 +0000
commit1186deb67fbd1dc1b4d4a704b0cc2ccb8e4b7534 (patch)
tree4e7d2d7309931e88f988b56071a4045e0fde6375
parent31ee166e8e1c3f18cb2fb6fc491c1d0ffd7b25f6 (diff)
downloadchrome-ec-1186deb67fbd1dc1b4d4a704b0cc2ccb8e4b7534.tar.gz
CHERRY-PICK: Fix bug with hibernate delay when running off battery
Fixes hibernate delay logic for chipset x86. With this change the machine will go in to hibernate one hour after going into G3 when running off battery. BUG=chrome-os-partner:25661 BRANCH=none TEST=Used console command hibdelay to set a reasonable hibernate delay time and tested all combinations of running off battery vs. AC and shutting off before or after the machine has been on for a hibdelay amount of time. Change-Id: I8adbd407b85598abdfc4d021f292e05896d06899 Original-Change-Id: Idd94d3677669dcd405732195b8cbbc1edca1e171 Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/172512 Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/186300 Tested-by: Dave Parker <dparker@chromium.org> Commit-Queue: Dave Parker <dparker@chromium.org>
-rw-r--r--common/chipset_x86_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/chipset_x86_common.c b/common/chipset_x86_common.c
index 63fecfdda9..2704dd143c 100644
--- a/common/chipset_x86_common.c
+++ b/common/chipset_x86_common.c
@@ -122,7 +122,7 @@ int x86_wait_signals(uint32_t want)
void x86_set_state(enum x86_state new_state)
{
/* Record the time we go into G3 */
- if (state == X86_G3)
+ if (new_state == X86_G3)
last_shutdown_time = get_time().val;
state = new_state;