linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Dahl <post@lespocky.de>
To: Sven Schwermer <sven@svenschwermer.de>
Cc: linux-leds@vger.kernel.org, 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 17:57:21 +0100	[thread overview]
Message-ID: <20220123165721.GA5951@falbala.internal.home.lespocky.de> (raw)
In-Reply-To: <37540afd-f2f1-52dd-f4f1-6e7b436e9595@svenschwermer.de>

[-- 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 --]

  reply	other threads:[~2022-01-23 16:57 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 [this message]
2022-01-23 19:55 ` Jacek Anaszewski

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=20220123165721.GA5951@falbala.internal.home.lespocky.de \
    --to=post@lespocky.de \
    --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).