Re: [RESEND PATCH 1/3] power: supply: max17040: pass the device fwnode to the power supply core

From: Krzysztof Kozlowski

Date: Mon Nov 09 2026 - 02:34:56 EST


On 08/11/2026 16:42, Hugo Karlsson wrote:
> 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]

If you are resending, then at least you could run checkpatch.

Please run scripts/checkpatch.pl on the patches and fix reported
warnings. After that, run also 'scripts/checkpatch.pl --strict' on the
patches and (probably) fix more warnings. Some warnings can be ignored,
especially from --strict run, but the code here looks like it needs a
fix. Feel free to get in touch if the warning is not clear.

Best regards,
Krzysztof