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>2013-10-10 16:40:58 +0000
commitf7e69a211ce0121ec06c79f6d82574d3347dec2f (patch)
treed5388368ec91e217a5b2299c9d4d820ad516ac74
parent6a46446ccc3c7ce867d145be93876f87464928cf (diff)
downloadchrome-ec-f7e69a211ce0121ec06c79f6d82574d3347dec2f.tar.gz
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:23224 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: Idd94d3677669dcd405732195b8cbbc1edca1e171 Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/172512 Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Randall Spangler <rspangler@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;