• Daniel Mack's avatar
    power_supply: Add support for writeable properties · 0011d2d4
    Daniel Mack authored
    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: default avatarDaniel 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: default avatarAnton Vorontsov <cbouatmailru@gmail.com>
    0011d2d4
power_supply_sysfs.c 7.72 KB