mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
power_supply: Add power_supply_get_by_phandle
Add method to get power supply by device tree phandle. Signed-off-by: Sebastian Reichel <sre@debian.org> Reviewed-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
This commit is contained in:
parent
32260308b4
commit
abce97708a
2 changed files with 34 additions and 0 deletions
|
@ -244,6 +244,14 @@ extern struct atomic_notifier_head power_supply_notifier;
|
|||
extern int power_supply_reg_notifier(struct notifier_block *nb);
|
||||
extern void power_supply_unreg_notifier(struct notifier_block *nb);
|
||||
extern struct power_supply *power_supply_get_by_name(const char *name);
|
||||
#ifdef CONFIG_OF
|
||||
extern struct power_supply *power_supply_get_by_phandle(struct device_node *np,
|
||||
const char *property);
|
||||
#else /* !CONFIG_OF */
|
||||
static inline struct power_supply *
|
||||
power_supply_get_by_phandle(struct device_node *np, const char *property)
|
||||
{ return NULL; }
|
||||
#endif /* CONFIG_OF */
|
||||
extern void power_supply_changed(struct power_supply *psy);
|
||||
extern int power_supply_am_i_supplied(struct power_supply *psy);
|
||||
extern int power_supply_set_battery_charged(struct power_supply *psy);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue