diff options
author | Ryan Zhang <Ryan.Zhang@quantatw.com> | 2016-05-30 16:27:54 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-06-01 20:37:08 -0700 |
commit | f6a53e9917b474e95afb42e2522fb88c61998c9a (patch) | |
tree | b458cd1ef126a4f78d5600b50821b5f659f4fe77 /include | |
parent | 0b55308198bb0833ae99eeb71facf470daffe596 (diff) | |
download | chrome-ec-f6a53e9917b474e95afb42e2522fb88c61998c9a.tar.gz |
COMMON: move precharge time to config.h
move PRECHARGE_TIMEOUT to config.h so that we can customize precharge time to
meet client's spec.
BUG=none
BRANCH=master
TEST=`make -j buildall`, precharge time is set to 300s in elm.
Change-Id: I5c3bf0d5c5240b9c087e6cdb7c6e97301efa9f84
Signed-off-by: Ryan Zhang <Ryan.Zhang@quantatw.com>
Reviewed-on: https://chromium-review.googlesource.com/348151
Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/charge_state.h | 2 | ||||
-rw-r--r-- | include/config.h | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/include/charge_state.h b/include/charge_state.h index 3a86bf4baf..f0847cdd09 100644 --- a/include/charge_state.h +++ b/include/charge_state.h @@ -11,7 +11,7 @@ /* Stuff that's common to all charger implementations can go here. */ /* Seconds to spend trying to wake a non-responsive battery */ -#define PRECHARGE_TIMEOUT 30 +#define PRECHARGE_TIMEOUT CONFIG_BATTERY_PRECHARGE_TIMEOUT /* Power state task polling periods in usec */ #define CHARGE_POLL_PERIOD_VERY_LONG MINUTE diff --git a/include/config.h b/include/config.h index 5f527d8ebe..e360745b41 100644 --- a/include/config.h +++ b/include/config.h @@ -174,6 +174,9 @@ */ #undef CONFIG_BATTERY_OVERRIDE_PARAMS +/* Maximum time to wake a non-responsive battery, in second */ +#define CONFIG_BATTERY_PRECHARGE_TIMEOUT 30 + /* * If defined, the charger will check for battery presence before attempting * to communicate with it. This avoids the 30 second delay when booting |