summaryrefslogtreecommitdiff
path: root/include/charge_state.h
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2013-03-14 16:17:18 -0700
committerChromeBot <chrome-bot@google.com>2013-03-15 09:07:58 -0700
commit05f496759f3e8f87940d3f4f78ffee53b249f3f0 (patch)
treec435d86ef6106da4a72df0239a2e557781113c60 /include/charge_state.h
parent744cada9d5a2edacf462c15febfc31fbf7f64a12 (diff)
downloadchrome-ec-05f496759f3e8f87940d3f4f78ffee53b249f3f0.tar.gz
Add external power present flag to charge_get_flags()
Modules that need to find out about charge/power state no longer need to use the lower-level switch API. (This will matter more in future CLs which handle conditions like "external power present, but at low power so we're doing battery assist" - that can simply be state=discharging,flags=external_power_present. BUG=chrome-os-partner:18256 BRANCH=none TEST=add AC power, UI shows charging indicator; remove AC, indicator goes away Change-Id: I62130a4e089297fa47ab03f6a76082593c936761 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/45515 Reviewed-by: Vic Yang <victoryang@chromium.org>
Diffstat (limited to 'include/charge_state.h')
-rw-r--r--include/charge_state.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/charge_state.h b/include/charge_state.h
index bf6404593e..e55a7c529c 100644
--- a/include/charge_state.h
+++ b/include/charge_state.h
@@ -65,6 +65,8 @@ enum power_state {
/* Charge state flags */
/* Forcing idle state */
#define CHARGE_FLAG_FORCE_IDLE (1 << 0)
+/* External (AC) power is present */
+#define CHARGE_FLAG_EXTERNAL_POWER (1 << 1)
/* Debugging constants, in the same order as enum power_state. This string
* table was moved here to sync with enum above.