]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
power: supply: support charge_types in extensions
authorJelle van der Waa <jvanderwaa@redhat.com>
Mon, 14 Apr 2025 13:18:40 +0000 (15:18 +0200)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Mon, 28 Apr 2025 23:05:53 +0000 (01:05 +0200)
commitc1f7375a246e5f810191a6c3031d2fa2b80e9f5e
tree6680edc435109b5db8135857da63cda438629573
parent11741b8e382d34b13277497ab91123d8b0b5c2db
power: supply: support charge_types in extensions

Similar to charge_behaviour, charge_types is an enum option where
reading the property shows the supported values, with the active value
surrounded by brackets. To be able to use it with a power_supply
extension a bitmask with the supported charge_Types values has to be
added to power_supply_ext.

Signed-off-by: Jelle van der Waa <jvanderwaa@redhat.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20250414131840.382756-2-jvanderwaa@redhat.com
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/power_supply_sysfs.c
drivers/power/supply/test_power.c
include/linux/power_supply.h