summaryrefslogtreecommitdiff
path: root/common/gaia_power.c
diff options
context:
space:
mode:
authorRong Chang <rongchang@chromium.org>2012-07-17 09:21:49 +0100
committerGerrit <chrome-bot@google.com>2012-07-17 14:41:00 -0700
commitea1cde3971127c910d4f1c861c3136e38efde8f1 (patch)
tree09201b210ba96a1a378e8ffb76a4ade15ea4d543 /common/gaia_power.c
parentc89edce83f1002bf221119267bc74f926c70e2c8 (diff)
downloadchrome-ec-ea1cde3971127c910d4f1c861c3136e38efde8f1.tar.gz
daisy: Re-read suspend gpio when asked for chipset state
The SUSPEND_L GPIO is marked interruptable, but this apparently does not work, and the gaia_suspend_event() function is not updated as expected. As a workaround, check the GPIO value on ever call to chipset_in_state(). BUG=chrome-os-partner:11285 TEST=manal Using new 'power' command check that the state updates when the AP is in suspend from 'on' to 'suspend'. Change-Id: I9c520e69b9910c649bf6d8381ee167da6facc634 Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/27652 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'common/gaia_power.c')
-rw-r--r--common/gaia_power.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/common/gaia_power.c b/common/gaia_power.c
index c0ae8cc8c6..bf060f9327 100644
--- a/common/gaia_power.c
+++ b/common/gaia_power.c
@@ -239,6 +239,13 @@ int gaia_power_init(void)
int chipset_in_state(int state_mask)
{
+ /*
+ * TODO(rongchang): fix suspend signal
+ * gaia_suspend_event() doesn't work. get ap_suspended
+ * again.
+ */
+ ap_suspended = !gpio_get_level(GPIO_SUSPEND_L);
+
/* If AP is off, match any off state for now */
if ((state_mask & CHIPSET_STATE_ANY_OFF) && !ap_on)
return 1;