* Are LED functions strings or uint32 in Documentation/devicetree/bindings/leds/common.yaml
@ 2025-07-16 3:19 E Shattow
2025-07-16 5:13 ` Pavel Machek
2025-07-16 10:17 ` Jacek Anaszewski
0 siblings, 2 replies; 4+ messages in thread
From: E Shattow @ 2025-07-16 3:19 UTC (permalink / raw)
To: Jacek Anaszewski, Pavel Machek; +Cc: linux-kernel@vger.kernel.org
Hello,
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
2:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/leds/leds-gpio.yaml
-E Shattow
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Are LED functions strings or uint32 in Documentation/devicetree/bindings/leds/common.yaml
2025-07-16 3:19 Are LED functions strings or uint32 in Documentation/devicetree/bindings/leds/common.yaml E Shattow
@ 2025-07-16 5:13 ` Pavel Machek
2025-07-16 5:38 ` E Shattow
2025-07-16 10:17 ` Jacek Anaszewski
1 sibling, 1 reply; 4+ messages in thread
From: Pavel Machek @ 2025-07-16 5:13 UTC (permalink / raw)
To: E Shattow; +Cc: Jacek Anaszewski, linux-kernel@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 803 bytes --]
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
--
I don't work for Nazis and criminals, and neither should you.
Boycott Putin, Trump, and Musk!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Are LED functions strings or uint32 in Documentation/devicetree/bindings/leds/common.yaml
2025-07-16 5:13 ` Pavel Machek
@ 2025-07-16 5:38 ` E Shattow
0 siblings, 0 replies; 4+ messages 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] 4+ messages in thread
* Re: Are LED functions strings or uint32 in Documentation/devicetree/bindings/leds/common.yaml
2025-07-16 3:19 Are LED functions strings or uint32 in Documentation/devicetree/bindings/leds/common.yaml E Shattow
2025-07-16 5:13 ` Pavel Machek
@ 2025-07-16 10:17 ` Jacek Anaszewski
1 sibling, 0 replies; 4+ messages in thread
From: Jacek Anaszewski @ 2025-07-16 10:17 UTC (permalink / raw)
To: E Shattow, Pavel Machek; +Cc: linux-kernel@vger.kernel.org
Hello,
On 7/16/25 05:19, E Shattow wrote:
> Hello,
>
> Documentation/devicetree/bindings/leds/common.yaml [1] describes a
> uint32 but the $ref is for a string, for "function". What's going on
In which line function is described as uint32?
> 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
>
> 2:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/leds/leds-gpio.yaml
>
> -E Shattow
>
>
--
Best regards,
Jacek Anaszewski
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-07-16 10:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-16 3:19 Are LED functions strings or uint32 in Documentation/devicetree/bindings/leds/common.yaml E Shattow
2025-07-16 5:13 ` Pavel Machek
2025-07-16 5:38 ` E Shattow
2025-07-16 10:17 ` Jacek Anaszewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).