You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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>
This commit is contained in:
committed by
Anton Vorontsov
parent
5f487cd34f
commit
0011d2d4a5
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user