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-25 21:17:18 +0000
commit873c9f46ee03060093efbb169d5fd454dfabed4e (patch)
tree26f3c0690d434aae6e019649dc95e53e88c1e8dc
parentb8d0f532f6378d9b0645e72e7e2bf165017f9336 (diff)
downloadchrome-ec-873c9f46ee03060093efbb169d5fd454dfabed4e.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: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: Icfb118fdc737ad53db60bb1bb96fc51c95b8bbdc Original-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> Reviewed-on: https://chromium-review.googlesource.com/174792 Commit-Queue: Dave Parker <dparker@chromium.org> Tested-by: 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;