power: supply: core: Use fwnode_property_*() in power_supply_get_battery_info()
authorHans de Goede <hdegoede@redhat.com>
Sun, 6 Feb 2022 18:35:36 +0000 (19:35 +0100)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Fri, 11 Feb 2022 18:08:34 +0000 (19:08 +0100)
commit7562ccd85ffb3fac15d731df1ea5c8974485626e
tree483559794d8fc12fcd6299456564e03e506b4f2c
parent784056d36f2779bce7e345285cfa1e097a9136bb
power: supply: core: Use fwnode_property_*() in power_supply_get_battery_info()

Switch power_supply_get_battery_info() over to use the generic
fwnode_property_*() property read functions. This is a preparation patch
for adding support for reading properties from other fwnode types such
as swnode properties added by platform code on x86 devices.

Note the parsing of the 2d matrix "ocv-capacity-table-%d" and
"resistance-temp-table" properties is not converted since this depends on
the raw of_get_property() accessor function of which there is no
fwnode_property_*() equivalent AFAICT. This means that these properties
will not be supported in swnodes for now.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/power_supply_core.c