summaryrefslogtreecommitdiff
path: root/include/extpower.h
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@chromium.org>2013-07-25 11:00:03 -0700
committerChromeBot <chrome-bot@google.com>2013-07-25 15:50:13 -0700
commit298a7276c27d1a7b6402dadfc1b0f2f45247ae2d (patch)
tree00e088f1c72de6d8aff87a023729b9f31792eeb6 /include/extpower.h
parent4231660869f6b282c5a589abb22e98681c052929 (diff)
downloadchrome-ec-298a7276c27d1a7b6402dadfc1b0f2f45247ae2d.tar.gz
Add turbo mode charger support, and tests for it.
Some chargers can run in a "turbo" mode, which lets it draw from the battery to provide extra power to the AP in short bursts. In order for this to work properly, the EC has to watch the current closely to make sure specific limits are observed. It also has to recognize specific adapters, since those limits vary depending on the rated power that the adapter can provide. This adds the basic functionality, plus a test for it. BUG=chrome-os-partner:20739 BRANCH=falco,peppy TEST=manual make BOARD=${BOARD} runtests On Falco, you can also use the "adapter" EC command to see what's going on. Try replacing the adapters and running that command to be sure they're correctly identified, too: > adapter Adapter 65W (590mv), turbo 1, AP_throttled 0 > We currently support 45W, 65W, and 90W adapters. Unknown adapters are treated as 65W, but don't enable turbo mode. Change-Id: I7e5407db825ce7e596cb495fb8cb4d1dd1ff639c Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/63372 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'include/extpower.h')
-rw-r--r--include/extpower.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/extpower.h b/include/extpower.h
index 36c5535633..1b51f3fa83 100644
--- a/include/extpower.h
+++ b/include/extpower.h
@@ -27,4 +27,9 @@ int extpower_is_present(void);
*/
void extpower_interrupt(enum gpio_signal signal);
+#ifdef CONFIG_EXTPOWER_FALCO
+/* Adapter-specific logic */
+#include "extpower_falco.h"
+#endif
+
#endif /* __CROS_EC_EXTPOWER_H */