Are LED functions strings or uint32 in Documentation/devicetree/bindings/leds/common.yaml
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?
-E Shattow
Hi!
Quoted 9 lines
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?
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
Signature · 2 lines
I don't work for Nazis and criminals, and neither should you. Boycott Putin, Trump, and Musk!
Quoted 12 lines · Pavel Machek
Hi!
Quoted 9 lines
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?
Quoted 7 lines
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
Hello,
Quoted 4 lines · E Shattow
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?
Quoted 13 lines
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?
-E Shattow
Signature · 2 lines
Best regards, Jacek Anaszewski