power_supply: sysfs: Use power_supply_*() API for accessing function attrs