Hi Jacek,
On 5/8/22 21:55, Jacek Anaszewski wrote:
Hi Sven and Sven,
On 5/4/22 11:24, Sven Schwermer wrote:
Hi Sven,
I did consider placing the property into the multicolor's sub nodes.
However, multicolor LEDs are not required to have firmware sub nodes.
At least the multicolor class API does not make any assumptions about
this.
So this is something to be clarified. The whole idea relies on having
sub-nodes in the multi-led node.
As far as I understand, multi-color LEDs don't require actual OF
sub-nodes. The Turris Omnia LED driver doesn't have sub-nodes, see
Documentation/devicetree/bindings/leds/cznic,turris-omnia-leds.yaml
Maybe it is better to define per Color like this:
multi-led@0 {
#address-cells = <1>;
#size-cells = <0>;
reg = <0x0>;
color = <LED_COLOR_ID_RGB>;
function = "eee-led-status";
led-0 {
color = <LED_COLOR_ID_RED>;
default-intensity = 100
};
led-1 {
color = <LED_COLOR_ID_GREEN>;
default-intensity = 0
};
led-2 {
color = <LED_COLOR_ID_BLUE>;
default-intensity = 0
};
};
I would go for this. Seems to be the most straightforward solution.
I agree, that this would be the best option. However, as noted above,
this wouldn't be compatible with all existing multi-color drivers.
Best regards,
Sven