From 4578166a89cd0205d67070496e63f3110a83fe2f Mon Sep 17 00:00:00 2001 From: Shawn Nematbakhsh Date: Thu, 18 Jun 2015 16:23:47 -0700 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/280563 Reviewed-by: Alec Berg --- include/charger.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/charger.h') 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 -- cgit v1.2.1