Skip to content
Commit 5b505366 authored by Mathew King's avatar Mathew King Committed by Sebastian Reichel
Browse files

power: supply: core: Add a macro that maps enum properties to text values



Reduce the number of touch points to add a new enum property to the
power_supply class by mapping the array of text values to the device
attribute descriptor. A new enum property can now added by creating an
array with the text values named POWER_SUPPLY_${PROPNAME}_TEXT and
adding POWER_SUPPLY_ENUM_ATTR(${PROPNAME}) to the power_supply_attrs
array.

Signed-off-by: default avatarMathew King <mathewk@chromium.org>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent d960d91f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment