Re: Combining multiple PWM LEDs into RGB LED?

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

 



Hi Sven,

On 1/20/22 3:07 PM, Sven Schwermer wrote:
Hi,

I'm wondering about the correct device tree syntax for organizing multiple PWM LEDs into a multi-color (RGB) LED. This is my device tree:

/ {
   rgb-led {
     pinctrl-names = "default";Hi Sven,
     pinctrl-0 = <&pinctrl_leds>;
     compatible = "pwm-leds";
     multi-led@0 {
       color = <LED_COLOR_ID_RGB>;
       led-red {
         pwms = <&pwm1 0 1000000>;
         color = <LED_COLOR_ID_RED>;
         max-brightness = <65535>;
       };
       led-green {
         pwms = <&pwm2 0 1000000>;
         color = <LED_COLOR_ID_GREEN>;
         max-brightness = <65535>;
       };
       led-blue {
         pwms = <&pwm3 0 1000000>;
         color = <LED_COLOR_ID_BLUE>;
         max-brightness = <65535>;
       };
     };
   };
   /* ... */
};

My kernel complains as follows:

of_pwm_get(): can't parse "pwms" property
leds_pwm rgb-led: unable to request PWM for multi-led: -2
leds_pwm: probe of rgb-led failed with error -2

Is my syntax incorrect or is this not a use case that is currently supported? I should also note that I back-ported the multi-LED feature to 5.4.158 so I may have missed some relevant patches.

Any insight is appreciated.

leds-pwm driver doesn't have support for multicolor LEDs. You'd have to
write a new driver, say leds-pwm-multicolor.

--
Best regards,
Jacek Anaszewski



[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