]> www.infradead.org Git - users/jedix/linux-maple.git/commit
power: supply: sysfs: print single value in uevent for POWER_SUPPLY_PROP_CHARGE_BEHAVIOUR
authorThomas Weißschuh <linux@weissschuh.net>
Mon, 11 Nov 2024 21:40:03 +0000 (22:40 +0100)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Wed, 4 Dec 2024 23:02:31 +0000 (00:02 +0100)
commit31d8440e07704d53041936222728636421957660
tree1613f8e18614f339f961449fb2f2853310db8fe5
parentdc90aa3a72e624a3eb30e61d47c4c501006dfb8b
power: supply: sysfs: print single value in uevent for POWER_SUPPLY_PROP_CHARGE_BEHAVIOUR

Currently an uevent contains the same string representation of a
property as sysfs. However for POWER_SUPPLY_PROP_CHARGE_BEHAVIOUR this
is specially formatted to indicate all possible values.
This doesn't make sense for uevents and complicates parsing.
Instead only include the currently active value in uevents.

As currently no in-tree driver uses POWER_SUPPLY_PROP_CHARGE_BEHAVIOUR
this change is not a problem.
Soon the property will actually be used so fix the formatting before
that happens.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Reviewed-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20241111-power-supply-extensions-v4-1-7240144daa8e@weissschuh.net
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/power_supply_sysfs.c