aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/power_supply.h
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2011-12-07 12:15:45 -0500
committerJeremy Fitzhardinge <jeremy@goop.org>2011-12-09 12:52:07 -0500
commit8351665195cec6d2b73cce8b66f02d6dde246a8e (patch)
tree3b31b34dc1737ff40679036d97a3f7d6c49ffa88 /include/linux/power_supply.h
parent25a0bc2dfc2ea732f40af2dae52426ead66ae76e (diff)
power_supply: allow a power supply to explicitly point to powered device
If a power supply has a scope of "Device", then allow the power supply to indicate what device it actually powers. This is represented in the power supply's sysfs directory as a symlink named "powers", which points to the sysfs directory of the powered device. If the device has children, then the sub-devices are also powered by the same power supply. Signed-off-by: Jeremy Fitzhardinge <jeremy@goop.org> Cc: Richard Hughes <richard@hughsie.com>
Diffstat (limited to 'include/linux/power_supply.h')
-rw-r--r--include/linux/power_supply.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
index 040a7b08e7c7..2e3c8279b3b0 100644
--- a/include/linux/power_supply.h
+++ b/include/linux/power_supply.h
@@ -218,6 +218,7 @@ static inline int power_supply_is_system_supplied(void) { return -ENOSYS; }
218extern int power_supply_register(struct device *parent, 218extern int power_supply_register(struct device *parent,
219 struct power_supply *psy); 219 struct power_supply *psy);
220extern void power_supply_unregister(struct power_supply *psy); 220extern void power_supply_unregister(struct power_supply *psy);
221extern int power_supply_powers(struct power_supply *psy, struct device *dev);
221 222
222/* For APM emulation, think legacy userspace. */ 223/* For APM emulation, think legacy userspace. */
223extern struct class *power_supply_class; 224extern struct class *power_supply_class;