Re: Combining multiple PWM LEDs into RGB LED?

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

 



Hello Sven,

On Thu, Jan 20, 2022 at 03:07:26PM +0100, Sven Schwermer wrote:
> 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";
>     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.

AFAIK nodody implemented multicolor functionality for the LEDs PWM
driver yet.  I think it should go to drivers/leds/leds-pwm.c and I
would offer to test it, once anybody sends patches for this. O:-)

Greets
Alex

-- 
/"\ ASCII RIBBON | »With the first link, the chain is forged. The first
\ / CAMPAIGN     | speech censured, the first thought forbidden, the
 X  AGAINST      | first freedom denied, chains us all irrevocably.«
/ \ HTML MAIL    | (Jean-Luc Picard, quoting Judge Aaron Satie)

Attachment: signature.asc
Description: PGP signature


[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