Re: [PATCH] power: supply: sysfs: Ratelimit "unavailable enum value" warning
From: Sebastian Reichel
Date: Sat Oct 17 2026 - 17:57:05 EST
On Mon, 05 Oct 2026 14:56:45 +0100, Robert Killick wrote:
> power_supply_show_enum_with_available() warns every time a driver
> reports a value that is not in its declared set of available values.
> For usb_type this happens on every sysfs read and on every uevent, so a
> driver that reports such a value and calls power_supply_changed()
> frequently can flood the kernel log.
>
> This can happen with drivers that pass a firmware-provided value
> through unchanged, as qcom_battmgr does for usb_type. On a OnePlus 10
> Pro (SM8450), whose firmware reports a vendor-specific usb_type, this
> produced ~128 warnings per second and kept systemd-journald at ~30% CPU.
>
> [...]
Applied, thanks!
[1/1] power: supply: sysfs: Ratelimit "unavailable enum value" warning
commit: 4d49915df53ddde71556e507bdc49b81cd4609c8
Best regards,
--
Sebastian Reichel <sebastian.reichel@xxxxxxxxxxxxx>