aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/power_supply.h
diff options
context:
space:
mode:
authorDaniel Mack <daniel@caiaq.de>2010-05-18 15:49:52 -0400
committerAnton Vorontsov <cbouatmailru@gmail.com>2010-05-19 04:14:42 -0400
commit0011d2d4a5f7bb5666dcfb9f9b3dbdb084ab98f1 (patch)
treec36b9e315de3978a408351968c758a5a7728f7ba /include/linux/power_supply.h
parent5f487cd34f4337f9bc27ca19da72a39d1b0a0ab4 (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 <daniel@caiaq.de> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Alexey Starikovskiy <astarikovskiy@suse.de> Cc: Len Brown <len.brown@intel.com> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Matt Reimer <mreimer@vpop.net> Cc: Evgeniy Polyakov <zbr@ioremap.net> Cc: Tejun Heo <tj@kernel.org> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
Diffstat (limited to 'include/linux/power_supply.h')
-rw-r--r--include/linux/power_supply.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
index c5f73a3ab3a..30083a896f3 100644
--- a/include/linux/power_supply.h
+++ b/include/linux/power_supply.h
@@ -145,6 +145,11 @@ struct power_supply {
145 int (*get_property)(struct power_supply *psy, 145 int (*get_property)(struct power_supply *psy,
146 enum power_supply_property psp, 146 enum power_supply_property psp,
147 union power_supply_propval *val); 147 union power_supply_propval *val);
148 int (*set_property)(struct power_supply *psy,
149 enum power_supply_property psp,
150 const union power_supply_propval *val);
151 int (*property_is_writeable)(struct power_supply *psy,
152 enum power_supply_property psp);
148 void (*external_power_changed)(struct power_supply *psy); 153 void (*external_power_changed)(struct power_supply *psy);
149 void (*set_charged)(struct power_supply *psy); 154 void (*set_charged)(struct power_supply *psy);
150 155