[PATCH v3] led: add function naming option from linux
Tom Rini
trini at konsulko.com
Thu Jan 23 15:33:02 CET 2025
On Thu, Jan 23, 2025 at 12:49:06PM +0100, Heiko Schocher wrote:
> in linux we have the option to create the name of a led
> optionally through the following properties:
>
> - function
> - color
> - function-enumerator
>
> This patch adds support for parsing this properties if there
> is no label property.
>
> To be as close as possible to linux import the following files
> from it:
>
> include/dt-bindings/leds/common.h
> include/linux/uapi/linux/uleds.h
[snip]
> ---
> as we introduce a new element in struct led_uc_priv, may we should add
> this functionality through a new Kconfig option? (Which also would make
> this optional and save some bytes for boards who do not need this...)
[snip]
> arch/sandbox/dts/test.dts | 37 ++++++++++++-
> doc/device-tree-bindings/leds/common.txt | 28 ++++++++++
> drivers/led/led-uclass.c | 70 ++++++++++++++++++++++--
> include/led.h | 6 ++
> test/dm/led.c | 22 +++++++-
> test/dm/ofnode.c | 2 +-
> 6 files changed, 158 insertions(+), 7 deletions(-)
Getting things out of order slightly, sorry. The commit message should
be updated a bit more still since we aren't copying files in. And we
should delete doc/device-tree-bindings/leds/common.txt in a pre-patch
because we have that from upstream now. As for size, how much is the
growth? You can use tools/qconfig.py -b, and then -f LED to find some
platforms to size compare before/after, and if you've not used buildman
for size checking before I've put my script up over at
https://source.denx.de/u-boot/u-boot-extras/-/raw/master/contrib/trini/u-boot-size-test.sh?ref_type=heads
now for easier sharing.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20250123/3064b7ea/attachment.sig>
More information about the U-Boot
mailing list