Skip to content
Commit 4e61f1e9 authored by Thomas Weißschuh's avatar Thomas Weißschuh Committed by Sebastian Reichel
Browse files

power: supply: core: fix charge_behaviour formatting



This property is documented to have a special format which exposes all
available behaviours and the currently active one at the same time. For
this special format some helpers are provided.

When the charge_behaviour property was added in
1b0b6cc8 ("power: supply: add charge_behaviour attributes"), it did
not update the default logic in in power_supply_sysfs.c to use the
format helpers. Thus by default only the currently active behaviour
is printed. This fixes the default logic to follow the documented
format.

There is currently only one in-tree drivers exposing charge behaviours -
thinkpad_acpi, which is not affected by the change, as it directly uses
the helpers and does not use the power_supply_sysfs.c logic.

Signed-off-by: default avatarThomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/20240303-power_supply-charge_behaviour_prop-v2-3-8ebb0a7c2409@weissschuh.net


Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent 521d75b4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment