linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Combining multiple PWM LEDs into RGB LED?
@ 2022-01-20 14:07 Sven Schwermer
  2022-01-23 16:57 ` Alexander Dahl
  2022-01-23 19:55 ` Jacek Anaszewski
  0 siblings, 2 replies; 3+ messages in thread
From: Sven Schwermer @ 2022-01-20 14:07 UTC (permalink / raw)
  To: linux-leds; +Cc: pavel, lee.jones, u.kleine-koenig, thierry.reding

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";
     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.

Best regards,
Sven

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-23 19:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-20 14:07 Combining multiple PWM LEDs into RGB LED? Sven Schwermer
2022-01-23 16:57 ` Alexander Dahl
2022-01-23 19:55 ` Jacek Anaszewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).