linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jacek Anaszewski <jacek.anaszewski@gmail.com>
To: Sven Schwermer <sven@svenschwermer.de>, linux-leds@vger.kernel.org
Cc: pavel@ucw.cz, lee.jones@linaro.org,
	u.kleine-koenig@pengutronix.de, thierry.reding@gmail.com
Subject: Re: Combining multiple PWM LEDs into RGB LED?
Date: Sun, 23 Jan 2022 20:55:32 +0100	[thread overview]
Message-ID: <b48eed49-a18e-eed1-f1f4-77b9f1eab39b@gmail.com> (raw)
In-Reply-To: <37540afd-f2f1-52dd-f4f1-6e7b436e9595@svenschwermer.de>

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

      parent reply	other threads:[~2022-01-23 19:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b48eed49-a18e-eed1-f1f4-77b9f1eab39b@gmail.com \
    --to=jacek.anaszewski@gmail.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=sven@svenschwermer.de \
    --cc=thierry.reding@gmail.com \
    --cc=u.kleine-koenig@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).