Allow building without battery charging

Some experimental boards may want to build without a battery charging task
to make bringup easier.

BUG=chrome-os-partner:18343
TEST=build all boards
BRANCH=none

Change-Id: I4269fea4046325241ad7720ec3457b0534aadda3
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/48974
Reviewed-by: Randall Spangler <rspangler@chromium.org>
This commit is contained in:
Bill Richardson
2013-04-23 13:36:00 -07:00
committed by ChromeBot
parent c6e5d592cb
commit c747652e49
2 changed files with 6 additions and 1 deletions

View File

@@ -373,8 +373,10 @@ static void state_machine(uint64_t tnow)
* Otherwise we could power on the AP only to shut it right
* back down due to insufficient battery.
*/
#ifdef CONFIG_TASK_CHARGER
if (charge_get_state() == PWR_STATE_INIT)
break;
#endif
/*
* Power the system on if possible. Gating due to insufficient

View File

@@ -146,7 +146,10 @@ int charge_get_percent(void);
/**
* Return non-zero if discharging and battery so low we should shut down.
*/
#ifdef CONFIG_TASK_CHARGER
int charge_want_shutdown(void);
#else
static inline int charge_want_shutdown(void) { return 0; }
#endif
#endif /* __CROS_EC_CHARGE_STATE_H */