* Re: Are LED functions strings or uint32 in Documentation/devicetree/bindings/leds/common.yaml
[not found] ` <aHc1E2xPMfvKYcYx@duo.ucw.cz>
@ 2025-07-16 5:38 ` E Shattow
0 siblings, 0 replies; only message in thread
From: E Shattow @ 2025-07-16 5:38 UTC (permalink / raw)
To: Pavel Machek
Cc: Jacek Anaszewski, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, linux-leds
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
^ permalink raw reply [flat|nested] only message in thread