summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--board/elm/board.h2
-rw-r--r--include/charge_state.h2
-rw-r--r--include/config.h3
3 files changed, 6 insertions, 1 deletions
diff --git a/board/elm/board.h b/board/elm/board.h
index 224bb7723a..6c54a280aa 100644
--- a/board/elm/board.h
+++ b/board/elm/board.h
@@ -28,6 +28,8 @@
/* AC adaptor, charger, battery */
#define CONFIG_BATTERY_CUT_OFF
+#undef CONFIG_BATTERY_PRECHARGE_TIMEOUT
+#define CONFIG_BATTERY_PRECHARGE_TIMEOUT 300
#define CONFIG_BATTERY_PRESENT_GPIO GPIO_BAT_PRESENT_L
#define CONFIG_BATTERY_SMART
#define CONFIG_CHARGE_MANAGER
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