Re: AW: AW: [PATCH v2 1/2] dt-bindings: leds: Add multi-color default-intensities property

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux