diff options
author | Shawn Nematbakhsh <shawnn@chromium.org> | 2015-06-18 16:23:47 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-07-22 22:30:00 +0000 |
commit | 4578166a89cd0205d67070496e63f3110a83fe2f (patch) | |
tree | a4f2781907961d79ed1a640e1db8094305e48069 /include/charger.h | |
parent | e5f7583cc67ff5ef86ceef94dbb595828410a333 (diff) | |
download | chrome-ec-4578166a89cd0205d67070496e63f3110a83fe2f.tar.gz |
charger: Inhibit power-on until charger is initialized
It's sometimes desirable to boot without a battery, but we may brown out
if we don't have sufficient current. Inhibit AP power-on, even if the system
is unprotected, until our charger and current limit are initialized.
BUG=chrome-os-partner:41258
TEST=Manual on reworked glados with subsequent commit. Remove battery and
attach Zinger. Verify EC powers on and AP doesn't boot. Run `powerbtn`,
verify that AP boots. Remove all power and attach battery, verify that EC
powers on and AP boots.
BRANCH=None
Change-Id: Ifc3d16f8288a035854e9fd05812ce6de33170d6a
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/280563
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Diffstat (limited to 'include/charger.h')
-rw-r--r-- | include/charger.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/charger.h b/include/charger.h index d29d66ed30..c73f0b6d33 100644 --- a/include/charger.h +++ b/include/charger.h @@ -49,6 +49,8 @@ void charger_get_params(struct charger_params *chg); #define CHG_FLAG_BAD_INPUT_CURRENT 0x00000004 #define CHG_FLAG_BAD_STATUS 0x00000008 #define CHG_FLAG_BAD_OPTION 0x00000010 +/* Bit to indicate that the charger data has been initialized */ +#define CHG_FLAG_INITIALIZED 0x00000020 /* All of the above CHG_FLAG_BAD_* bits */ #define CHG_FLAG_BAD_ANY 0x0000001f |