Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fdeaf705 authored by Mathew King's avatar Mathew King Committed by Greg Kroah-Hartman
Browse files

UPSTREAM: 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>
(cherry picked from commit 5b505366ac6c77a623e18fe18cedb2d4d3c9a7f3)
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
Change-Id: I6e14c215bd2c2cc39d7649062c238e65d11eabaa
parent e959065e
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