diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/power_supply.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index 5c2600630dc9..3e28fe188d17 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/workqueue.h> | 16 | #include <linux/workqueue.h> |
17 | #include <linux/leds.h> | 17 | #include <linux/leds.h> |
18 | #include <linux/spinlock.h> | 18 | #include <linux/spinlock.h> |
19 | #include <linux/notifier.h> | ||
19 | 20 | ||
20 | struct device; | 21 | struct device; |
21 | 22 | ||
@@ -158,6 +159,10 @@ enum power_supply_type { | |||
158 | POWER_SUPPLY_TYPE_USB_ACA, /* Accessory Charger Adapters */ | 159 | POWER_SUPPLY_TYPE_USB_ACA, /* Accessory Charger Adapters */ |
159 | }; | 160 | }; |
160 | 161 | ||
162 | enum power_supply_notifier_events { | ||
163 | PSY_EVENT_PROP_CHANGED, | ||
164 | }; | ||
165 | |||
161 | union power_supply_propval { | 166 | union power_supply_propval { |
162 | int intval; | 167 | int intval; |
163 | const char *strval; | 168 | const char *strval; |
@@ -235,6 +240,9 @@ struct power_supply_info { | |||
235 | int use_for_apm; | 240 | int use_for_apm; |
236 | }; | 241 | }; |
237 | 242 | ||
243 | extern struct atomic_notifier_head power_supply_notifier; | ||
244 | extern int power_supply_reg_notifier(struct notifier_block *nb); | ||
245 | extern void power_supply_unreg_notifier(struct notifier_block *nb); | ||
238 | extern struct power_supply *power_supply_get_by_name(const char *name); | 246 | extern struct power_supply *power_supply_get_by_name(const char *name); |
239 | extern void power_supply_changed(struct power_supply *psy); | 247 | extern void power_supply_changed(struct power_supply *psy); |
240 | extern int power_supply_am_i_supplied(struct power_supply *psy); | 248 | extern int power_supply_am_i_supplied(struct power_supply *psy); |