Re: [RESEND PATCH 1/3] power: supply: max17040: pass the device fwnode to the power supply core
From: Svyatoslav Ryhel
Date: Sun Nov 08 2026 - 11:15:53 EST
нд, 8 лист. 2026 р. о 17:43 Hugo Karlsson <huggek@xxxxxxxxxxx> пише:
>
> Since commit f4b782af61ae ("power: max17040: pass status property from
> supplier") the driver forwards POWER_SUPPLY_PROP_STATUS to its supplier,
> and the DT binding documents a power-supplies property for naming that
> supplier. The driver never passes its device node to
> devm_power_supply_register(), however, so the power supply core cannot
> parse power-supplies and the battery never gets a supplier from
> firmware. The status lookup then always returns -ENODEV and userspace
> sees POWER_SUPPLY_STATUS_UNKNOWN.
>
> Set psy_cfg.fwnode the way max17042_battery and cw2015_battery already
> do.
>
> Fixes: f4b782af61ae ("power: max17040: pass status property from supplier")
> Assisted-by: Claude:claude-opus-5-5 [Claude Code]
> Signed-off-by: Hugo Karlsson <huggek@xxxxxxxxxxx>
> ---
> drivers/power/supply/max17040_battery.c | 1 +
> 1 file changed, 1 insertion(+)
>
Tested-by: Svyatoslav Ryhel <clamor95@xxxxxxxxx> # LG P895
Reviewed-by: Svyatoslav Ryhel <clamor95@xxxxxxxxx>