aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/power/charger-manager.h25
1 files changed, 17 insertions, 8 deletions
diff --git a/include/linux/power/charger-manager.h b/include/linux/power/charger-manager.h
index baa299a95e13..241065c9ce51 100644
--- a/include/linux/power/charger-manager.h
+++ b/include/linux/power/charger-manager.h
@@ -31,6 +31,16 @@ enum polling_modes {
31 CM_POLL_CHARGING_ONLY, 31 CM_POLL_CHARGING_ONLY,
32}; 32};
33 33
34enum cm_event_types {
35 CM_EVENT_UNKNOWN = 0,
36 CM_EVENT_BATT_FULL,
37 CM_EVENT_BATT_IN,
38 CM_EVENT_BATT_OUT,
39 CM_EVENT_EXT_PWR_IN_OUT,
40 CM_EVENT_CHG_START_STOP,
41 CM_EVENT_OTHERS,
42};
43
34/** 44/**
35 * struct charger_global_desc 45 * struct charger_global_desc
36 * @rtc_name: the name of RTC used to wake up the system from suspend. 46 * @rtc_name: the name of RTC used to wake up the system from suspend.
@@ -159,14 +169,13 @@ struct charger_manager {
159#ifdef CONFIG_CHARGER_MANAGER 169#ifdef CONFIG_CHARGER_MANAGER
160extern int setup_charger_manager(struct charger_global_desc *gd); 170extern int setup_charger_manager(struct charger_global_desc *gd);
161extern bool cm_suspend_again(void); 171extern bool cm_suspend_again(void);
172extern void cm_notify_event(struct power_supply *psy,
173 enum cm_event_types type, char *msg);
162#else 174#else
163static void __maybe_unused setup_charger_manager(struct charger_global_desc *gd) 175static inline int setup_charger_manager(struct charger_global_desc *gd)
164{ } 176{ return 0; }
165 177static inline bool cm_suspend_again(void) { return false; }
166static bool __maybe_unused cm_suspend_again(void) 178static inline void cm_notify_event(struct power_supply *psy,
167{ 179 enum cm_event_types type, char *msg) { }
168 return false;
169}
170#endif 180#endif
171
172#endif /* _CHARGER_MANAGER_H */ 181#endif /* _CHARGER_MANAGER_H */