* Multicolor leds-gpio
@ 2020-08-05 21:56 Luca Weiss
2020-08-05 22:05 ` Pavel Machek
0 siblings, 1 reply; 4+ messages in thread
From: Luca Weiss @ 2020-08-05 21:56 UTC (permalink / raw)
To: linux-leds
Hi,
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.
Regards
Luca
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Multicolor leds-gpio
2020-08-05 21:56 Multicolor leds-gpio Luca Weiss
@ 2020-08-05 22:05 ` Pavel Machek
2020-08-06 10:52 ` Alexander Dahl
0 siblings, 1 reply; 4+ messages in thread
From: Pavel Machek @ 2020-08-05 22:05 UTC (permalink / raw)
To: Luca Weiss; +Cc: linux-leds
[-- Attachment #1: Type: text/plain, Size: 778 bytes --]
Hi!
> 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.
For gpio... well, I'm not sure you'll get useful colors that way. You
can probably still do multicolor, yes.
Best regards,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Multicolor leds-gpio
2020-08-05 22:05 ` Pavel Machek
@ 2020-08-06 10:52 ` Alexander Dahl
2020-08-06 19:24 ` Pavel Machek
0 siblings, 1 reply; 4+ messages in thread
From: Alexander Dahl @ 2020-08-06 10:52 UTC (permalink / raw)
To: linux-leds; +Cc: Pavel Machek, Luca Weiss
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Multicolor leds-gpio
2020-08-06 10:52 ` Alexander Dahl
@ 2020-08-06 19:24 ` Pavel Machek
0 siblings, 0 replies; 4+ messages in thread
From: Pavel Machek @ 2020-08-06 19:24 UTC (permalink / raw)
To: Alexander Dahl; +Cc: linux-leds, Luca Weiss
[-- Attachment #1: Type: text/plain, Size: 1591 bytes --]
Hi!
> > > 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.
It may make sense, yes.
> > 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.
> ;-)
Well, you can still produce all the colors with three gpio leds.
And for resistors are not calibrated carefully, you'll get:
- R: red
- G: green
- B: blue
- R + G: green with hint of yellow
- R + B: blue
- G + B: blue
- R + G + B: blue
:-)
But yes, patch might be interesting. Will you create one?
Best regards,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-08-06 19:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-05 21:56 Multicolor leds-gpio Luca Weiss
2020-08-05 22:05 ` Pavel Machek
2020-08-06 10:52 ` Alexander Dahl
2020-08-06 19:24 ` Pavel Machek
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).