summaryrefslogtreecommitdiff
path: root/include/config.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/config.h')
-rw-r--r--include/config.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/include/config.h b/include/config.h
index 5709cfe1d2..876ff4f5e8 100644
--- a/include/config.h
+++ b/include/config.h
@@ -211,12 +211,14 @@
* Note that some boards have their own unique battery constants / functions.
* In this case, those are provided in board/(boardname)/battery.c, and none of
* these are defined.
+ * Defining one of these will automatically define CONFIG_BATTERY near the end
+ * of this file. If you add a new config here, you'll need to update that
+ * check.
*/
#undef CONFIG_BATTERY_BQ20Z453
#undef CONFIG_BATTERY_BQ27541
#undef CONFIG_BATTERY_BQ27621
#undef CONFIG_BATTERY_MAX17055
-#undef CONFIG_BATTERY_SAMUS
/* Compile mock battery support; used by tests. */
#undef CONFIG_BATTERY_MOCK
@@ -3051,6 +3053,16 @@
#endif
/*****************************************************************************/
+/* Define CONFIG_BATTERY if board has a battery. */
+#if defined(CONFIG_BATTERY_BQ20Z453) || \
+ defined(CONFIG_BATTERY_BQ27541) || \
+ defined(CONFIG_BATTERY_BQ27621) || \
+ defined(CONFIG_BATTERY_MAX17055) || \
+ defined(CONFIG_BATTERY_SMART)
+#define CONFIG_BATTERY
+#endif
+
+/*****************************************************************************/
/*
* Handle task-dependent configs.
*