Re: Are LED functions strings or uint32 in Documentation/devicetree/bindings/leds/common.yaml

From: E Shattow
Date: Wed Jul 16 2025 - 01:39:03 EST




On 7/15/25 22:13, Pavel Machek wrote:
> Hi!
>
>> Documentation/devicetree/bindings/leds/common.yaml [1] describes a
>> uint32 but the $ref is for a string, for "function". What's going on
>> there? Also what is the reasoning for that sort ordering [2] in the
>> examples, are we saying that gpios is like a register and function or
>> default-state is a kind of status?
>>
>> 1:
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/leds/common.yaml
>>
>
> You may want to cc devicetree people and linux-leds mailing list.
>
> Take a look at include/dt-bindings/leds/common.h, LED_FUNCTION_PANIC
> (for example) is a string, so documentation looks consistent to me.
>
> BR,
> Pavel

Hi Pavel, thanks for the correction. That makes sense to me now, it is
more of a function name than a function enum.

Question about the dts examples' sort ordering remains? I try to follow
the devicetree code style document but I must get confused too easily :-)

Cheers,

-E

CC: devicetree, linux-leds