Skip to content
Commit a6456d43 authored by Hans de Goede's avatar Hans de Goede Committed by Sebastian Reichel
Browse files

power: supply: sysfs: Add power_supply_show_enum_with_available() helper



Turn power_supply_charge_behaviour_show() into a generic function for
showing enum values with their available (for writing) values shown
and the current value shown surrounded by sqaure-brackets like
the show() output for "usb_type" and "charge_behaviour".

This is a preparation patch for refactoring the "usb_type" property
handling to use a bitmask indicating available usb-types + this new
generic function.

Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20240831142039.28830-5-hdegoede@redhat.com


Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent 03ec41c1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment