summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2012-05-15 13:47:18 -0700
committerRandall Spangler <rspangler@chromium.org>2012-05-17 09:30:38 -0700
commit5907675a477a2fd8af974d0cb1619cae57a83290 (patch)
treeebe472aa4b55a572ac8914db3b85be2d0ed1b66a /include
parent134f80ee0614edb146068f66d6d53eb394cc8c32 (diff)
downloadchrome-ec-5907675a477a2fd8af974d0cb1619cae57a83290.tar.gz
Add AC state change hook
And start wiring to x86_power so it can detect AC state changes (needed to enable/disable turbo). *YES*, this compiles for BDS/Daisy now... Signed-off-by: Randall Spangler <rspangler@chromium.org> BUG=chrome-os-partner:9069 TEST=plug/unplug AC power and look for "x86 AC on" / "x86 AC off" in debug log Change-Id: I8399fab9637d6635a1c615f07448fd45b86bc25f
Diffstat (limited to 'include')
-rw-r--r--include/hooks.h1
-rw-r--r--include/power_button.h3
2 files changed, 4 insertions, 0 deletions
diff --git a/include/hooks.h b/include/hooks.h
index 8bce2166f7..16cf72d506 100644
--- a/include/hooks.h
+++ b/include/hooks.h
@@ -36,6 +36,7 @@ enum hook_type {
* voltage rails are still on */
HOOK_CHIPSET_SHUTDOWN, /* System is shutting down. All suspend rails
* are still on. */
+ HOOK_AC_CHANGE, /* AC power plugged in or removed */
};
diff --git a/include/power_button.h b/include/power_button.h
index b25b90661a..7a2283da9b 100644
--- a/include/power_button.h
+++ b/include/power_button.h
@@ -18,4 +18,7 @@ void power_button_interrupt(enum gpio_signal signal);
/* Power button task */
void power_button_task(void);
+/* Return non-zero if AC power is present. */
+int power_ac_present(void);
+
#endif /* __CROS_EC_POWER_BUTTON_H */