Re: [PATCH v2] power: supply: max17040: handle missing status supplier
From: Sebastian Reichel
Date: Mon Jul 20 2026 - 18:32:56 EST
On Wed, 01 Jul 2026 14:10:42 +0800, Jianing Li wrote:
> MAX17040 does not report charger state itself, so the driver forwards
> POWER_SUPPLY_PROP_STATUS to a supplier power supply. If no supplier is
> registered, power_supply_get_property_from_supplier() returns -ENODEV and
> leaves the output value untouched.
>
> max17040_get_property() currently ignores that error and returns success,
> so userspace can read an uninitialized status value from the battery power
> supply. This happens on systems that use the fuel gauge without a charger
> supplier relationship in firmware.
>
> [...]
Applied, thanks!
[1/1] power: supply: max17040: handle missing status supplier
commit: 725668c6b6aa3971fe850659102c250d0d676e18
Best regards,
--
Sebastian Reichel <sebastian.reichel@xxxxxxxxxxxxx>