* 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
* Re: Combining multiple PWM LEDs into RGB LED?
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
1 sibling, 0 replies; 3+ messages in thread
From: Alexander Dahl @ 2022-01-23 16:57 UTC (permalink / raw)
To: Sven Schwermer
Cc: linux-leds, pavel, lee.jones, u.kleine-koenig, thierry.reding
[-- Attachment #1: Type: text/plain, Size: 1799 bytes --]
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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Combining multiple PWM LEDs into RGB LED?
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
1 sibling, 0 replies; 3+ messages in thread
From: Jacek Anaszewski @ 2022-01-23 19:55 UTC (permalink / raw)
To: Sven Schwermer, linux-leds
Cc: pavel, lee.jones, u.kleine-koenig, thierry.reding
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
^ 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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.