linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Dahl <ada@thorsis.com>
To: linux-leds@vger.kernel.org
Cc: Pavel Machek <pavel@ucw.cz>, Luca Weiss <luca@z3ntu.xyz>
Subject: Re: Multicolor leds-gpio
Date: Thu, 06 Aug 2020 12:52:33 +0200	[thread overview]
Message-ID: <2050851.IQFrM7rjFq@ada> (raw)
In-Reply-To: <20200805220547.mkjtuzcitwrb6whn@duo.ucw.cz>

Hei hei,

Am Donnerstag, 6. August 2020, 00:05:47 CEST schrieb Pavel Machek:
> > would it be possible to make the leds-gpio driver compatible with the new
> > multicolor framework for a light that's composed of 3 leds (red, green,
> > blue) and where each led is controlled via a gpio (so it can produce 8
> > different colors)? As far as I can tell leds-gpio is too generic to
> > support that but please correct me if I'm wrong. What's the way forward
> > here for this use case? The same probably also applies to leds-pwm.
> 
> For pwm it definitely makes sense.

I think it also makes sense for plain GPIO, I asked the same thing last year 
IIRC.

> For gpio... well, I'm not sure you'll get useful colors that way. You
> can probably still do multicolor, yes.

Let's assume a typical RGB LED, like the one on the SAMA5D27-SOM1-EK board, 
you would roughly get those colors:

- R: red
- G: green
- B: blue
- R + G: yellow
- R + B: magenta
- G + B: cyan
- R + G + B: white

I count more than twice the colors as with the simple leds-gpio approach only. 
;-)

SCNR
Alex




  reply	other threads:[~2020-08-06 17:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-05 21:56 Multicolor leds-gpio Luca Weiss
2020-08-05 22:05 ` Pavel Machek
2020-08-06 10:52   ` Alexander Dahl [this message]
2020-08-06 19:24     ` Pavel Machek

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=2050851.IQFrM7rjFq@ada \
    --to=ada@thorsis.com \
    --cc=linux-leds@vger.kernel.org \
    --cc=luca@z3ntu.xyz \
    --cc=pavel@ucw.cz \
    /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).