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.
One possible solution that I came up with is to do something like this:
multi-led {
color = <LED_COLOR_ID_RGB>;
default-intensities = <
LED_COLOR_ID_RED 100
LED_COLOR_ID_GREEN 0
LED_COLOR_ID_BLUE 0
>;
led-0 {
color = <LED_COLOR_ID_RED>;
};
led-1 {
color = <LED_COLOR_ID_GREEN>;
};
led-2 {
color = <LED_COLOR_ID_BLUE>;
};
};
[...]
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.
--
Best regards,
Jacek Anaszewski