Re: [PATCH] power: supply: generic-adc-battery: fix status with no supplier
From: Sebastian Reichel
Date: Sat Oct 17 2026 - 17:57:29 EST
On Mon, 12 Oct 2026 22:21:53 -0400, Tim Douglas wrote:
> power_supply_am_i_supplied() returns -ENODEV when no registered power
> supply supplies the battery. generic-adc-battery's gab_work() tests this
> return value as a boolean, so -ENODEV takes the supplied branch and
> reports CHARGING, or NOT_CHARGING if the charge-finished GPIO is asserted,
> instead of DISCHARGING.
>
> This was noticed while bringing up an out-of-tree Linux port to the
> WikiReader: the driver reported CHARGING on a device powered by two AAA
> batteries with no charging hardware.
>
> [...]
Applied, thanks!
[1/1] power: supply: generic-adc-battery: fix status with no supplier
commit: 8ae5a3f40045ff486826ed6b6a83e39a0f380073
Best regards,
--
Sebastian Reichel <sebastian.reichel@xxxxxxxxxxxxx>