The goal of this series is to replace any OF specific code in the
power-supply core with more generic fwnode code.
The first 2 patches of this series mostly take care of removing .of_node
from power_supply_config in favor of using the existing .fwnode.
Patch 3 replaces the OF specific logic in battery-info. This will
hopefully also allow Hans de Goede reusing the code with his Intel
Dollar Cove TI CC battery driver series.
Patch 4 replaces the OF phandle code with fwnode to have everything
converted.
Finally patch 5 renames some functions to remove the OF terminology
and allows using them without CONFIG_OF being enabled.
Note, that I do not own a single device making use of the
"ocv-capacity-celsius" and "resistance-temp-table", which means patch 3
is basically untested. I would really appreciate if somebody gives this
series a test run on an affected device.
Changes in PATCHv2:
- Link to v1: https://lore.kernel.org/r/20250225-psy-core-convert-to-fwnode-v1-0-d5e4369936bb@collabora.com
- drop merged patches
- add new patch renaming power_supply_get_by_phandle to power_supply_get_by_reference
- rebase to latest power-supply for-next branch
- collected Reviewed-by
- rewrite cover letter accordingly
---
Sebastian Reichel (5):
regulator: act8865-regulator: switch psy_cfg from of_node to fwnode
power: supply: core: remove of_node from power_supply_config
power: supply: core: battery-info: fully switch to fwnode
power: supply: core: convert to fwnnode
power: supply: core: rename power_supply_get_by_phandle to power_supply_get_by_reference
drivers/phy/allwinner/phy-sun4i-usb.c | 2 +-
drivers/power/supply/bq2415x_charger.c | 2 +-
drivers/power/supply/power_supply_core.c | 193 +++++++++++++++++--------------
drivers/regulator/act8865-regulator.c | 2 +-
include/linux/power_supply.h | 16 +--
5 files changed, 109 insertions(+), 106 deletions(-)
---
base-commit: fbc1d056d3f3d417bc9df521cb45a0f51758b64a
change-id: 20250221-psy-core-convert-to-fwnode-d5a5442fc3f9
Best regards,
--
Sebastian Reichel <sebastian.reichel@collabora.com>