power: supply: core: Add power_supply_battery_info and API
authorLiam Breck <kernel@networkimprov.net>
Wed, 7 Jun 2017 18:37:51 +0000 (11:37 -0700)
committerSebastian Reichel <sebastian.reichel@collabora.co.uk>
Thu, 8 Jun 2017 14:29:28 +0000 (16:29 +0200)
commitc08b1f45d7d193b3e6dcbbf30d403cb49b667b8c
tree9f7389a87a3d8ff991f61d70d8224adee4f1e3f8
parent230670479a6c54dcae6387119bb7d4441d7870b2
power: supply: core: Add power_supply_battery_info and API

power_supply_get_battery_info() reads battery data from devicetree.
struct power_supply_battery_info provides battery data to drivers.
Its fields correspond to elements in enum power_supply_property.
Drivers may surface battery data in sysfs via corresponding
POWER_SUPPLY_PROP_* fields.

Signed-off-by: Matt Ranostay <matt@ranostay.consulting>
Signed-off-by: Liam Breck <kernel@networkimprov.net>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Documentation/power/power_supply_class.txt
drivers/power/supply/power_supply_core.c
include/linux/power_supply.h