summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/charge_manager.h6
-rw-r--r--include/config.h6
2 files changed, 12 insertions, 0 deletions
diff --git a/include/charge_manager.h b/include/charge_manager.h
index ff6788126e..6d5bacc2df 100644
--- a/include/charge_manager.h
+++ b/include/charge_manager.h
@@ -81,6 +81,12 @@ enum dualrole_capabilities {
void charge_manager_update_dualrole(int port, enum dualrole_capabilities cap);
/**
+ * Tell charge_manager to leave safe mode and switch to standard port / ILIM
+ * selection logic.
+ */
+void charge_manager_leave_safe_mode(void);
+
+/**
* Charge ceiling can be set independently by different tasks / functions,
* for different purposes.
*/
diff --git a/include/config.h b/include/config.h
index eb6d3e1d47..6d1e7ee9d1 100644
--- a/include/config.h
+++ b/include/config.h
@@ -434,6 +434,12 @@
/* Handle the external power limit host command in charge manager */
#undef CONFIG_CHARGE_MANAGER_EXTERNAL_POWER_LIMIT
+/* Initially enter safe mode, with relaxed port / current selection rules */
+#define CONFIG_CHARGE_MANAGER_SAFE_MODE
+
+/* Leave safe mode when battery pct meets or exceeds this value */
+#define CONFIG_CHARGE_MANAGER_BAT_PCT_SAFE_MODE_EXIT 2
+
/* The hardware has some input current ramping/back-off mechanism */
#undef CONFIG_CHARGE_RAMP_HW