]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - include/linux/power_supply.h
Merge branch 'power-supply-scope' of git://git.kernel.org/pub/scm/linux/kernel/git...
[mirror_ubuntu-zesty-kernel.git] / include / linux / power_supply.h
index 9c83e04f6a43db8b5fdfd7db002704faec3c9f2c..fa9b962aec124ad0e126d7400d8a92325525d9ff 100644 (file)
@@ -74,6 +74,12 @@ enum {
        POWER_SUPPLY_CAPACITY_LEVEL_FULL,
 };
 
+enum {
+       POWER_SUPPLY_SCOPE_UNKNOWN = 0,
+       POWER_SUPPLY_SCOPE_SYSTEM,
+       POWER_SUPPLY_SCOPE_DEVICE,
+};
+
 enum power_supply_property {
        /* Properties of type `int' */
        POWER_SUPPLY_PROP_STATUS = 0,
@@ -116,6 +122,7 @@ enum power_supply_property {
        POWER_SUPPLY_PROP_TIME_TO_FULL_NOW,
        POWER_SUPPLY_PROP_TIME_TO_FULL_AVG,
        POWER_SUPPLY_PROP_TYPE, /* use power_supply.type instead */
+       POWER_SUPPLY_PROP_SCOPE,
        /* Properties of type `const char *' */
        POWER_SUPPLY_PROP_MODEL_NAME,
        POWER_SUPPLY_PROP_MANUFACTURER,
@@ -212,6 +219,7 @@ static inline int power_supply_is_system_supplied(void) { return -ENOSYS; }
 extern int power_supply_register(struct device *parent,
                                 struct power_supply *psy);
 extern void power_supply_unregister(struct power_supply *psy);
+extern int power_supply_powers(struct power_supply *psy, struct device *dev);
 
 /* For APM emulation, think legacy userspace. */
 extern struct class *power_supply_class;