diff options
| author | Daniel Mack <[email protected]> | 2010-05-18 21:49:52 +0200 |
|---|---|---|
| committer | Anton Vorontsov <[email protected]> | 2010-05-19 12:14:42 +0400 |
| commit | 0011d2d4a5f7bb5666dcfb9f9b3dbdb084ab98f1 (patch) | |
| tree | c36b9e315de3978a408351968c758a5a7728f7ba /include/linux | |
| parent | 5f487cd34f4337f9bc27ca19da72a39d1b0a0ab4 (diff) | |
power_supply: Add support for writeable properties
This patch adds support for writeable power supply properties and
exposes them as writeable to sysfs.
A power supply implementation must implement two new function calls in
order to use that feature:
int set_property(struct power_supply *psy,
enum power_supply_property psp,
const union power_supply_propval *val);
int property_is_writeable(struct power_supply *psy,
enum power_supply_property psp);
Signed-off-by: Daniel Mack <[email protected]>
Cc: David Woodhouse <[email protected]>
Cc: Alexey Starikovskiy <[email protected]>
Cc: Len Brown <[email protected]>
Cc: Mark Brown <[email protected]>
Cc: Matt Reimer <[email protected]>
Cc: Evgeniy Polyakov <[email protected]>
Cc: Tejun Heo <[email protected]>
Signed-off-by: Anton Vorontsov <[email protected]>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/power_supply.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index c5f73a3ab3ab..30083a896f36 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h @@ -145,6 +145,11 @@ struct power_supply { int (*get_property)(struct power_supply *psy, enum power_supply_property psp, union power_supply_propval *val); + int (*set_property)(struct power_supply *psy, + enum power_supply_property psp, + const union power_supply_propval *val); + int (*property_is_writeable)(struct power_supply *psy, + enum power_supply_property psp); void (*external_power_changed)(struct power_supply *psy); void (*set_charged)(struct power_supply *psy); |