From: Pavel Machek <pavel@ucw.cz>
To: Alexander Dahl <post@lespocky.de>, Luca Weiss <luca@z3ntu.xyz>,
Linux LED Subsystem <linux-leds@vger.kernel.org>,
bjorn.andersson@linaro.org
Subject: Re: Clarification regarding multicolor leds
Date: Sat, 24 Oct 2020 08:48:59 +0200 [thread overview]
Message-ID: <20201024064859.GB28478@amd> (raw)
In-Reply-To: <20201024064238.ahnojlj6b7r3eszn@falbala.internal.home.lespocky.de>
[-- Attachment #1: Type: text/plain, Size: 2088 bytes --]
Hi!
> On Sat, Oct 24, 2020 at 12:48:42AM +0200, Luca Weiss wrote:
> > I'm currently experimenting with the qcom lpg[0] which is a driver for the rgb
> > notification led found on e.g. Snapdragon 801 devices (and many more),
> > specifically my example is about the Fairphone 2 (msm8974-fairphone-fp2).
>
> Great to hear someone is interested in mainline support for Fairphone.
> I just bought a used FP2 on ebay. :-)
You may want to cc phone-devel@vger.kernel.org.
And yes, I'd like to see usable phone running mainline. I currently
have Droid 4, which is close.
> > [0] https://lore.kernel.org/lkml/20201021201224.3430546-1-bjorn.andersson@linaro.org/
> >
> > My dts is looking like the following (abbreviated):
> >
> > [in lpg node]
> > multi-led {
> > color = <LED_COLOR_ID_MULTI>;
> > function = LED_FUNCTION_STATUS;
> > ....
> > };
Make it _ID_RGB.
> > (sidenote: the LED_FUNCTION_INDICATOR should probably also be
> > LED_FUNCTION_STATUS there; the dts was made before the better descriptions for
> > the defines have been added)
> >
> > This gets the following directories created in /sys/class/leds/:
> >
> > blue:indicator
> > green:indicator
> > red:indicator
>
> That's right. From Linux point of view these behave like three
> independent LEDs. It's fully up to userspace to handle this.
Yes. Eventually we'll want to switch Pinephone to newer interface.
> > What's further confusing me is that include/dt-bindings/leds/common.h states
> > (reformatted for clarity):
> >
> > /* For multicolor LEDs */
> > #define LED_COLOR_ID_MULTI 8
> >
> > /* For multicolor LEDs that can do arbitrary color, so this would include RGBW
> > and similar */
> > #define LED_COLOR_ID_RGB 9
> >
> > It sounds like these comments are the wrong way around as it says that RGB
> > does RGBW & others while MULTI is normal RGB?
Multi is for strange stuff like Blue-UV combination. Avoid.
Best regards,
Pavel
--
http://www.livejournal.com/~pavelmachek
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
next prev parent reply other threads:[~2020-10-24 6:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-23 22:48 Clarification regarding multicolor leds Luca Weiss
2020-10-24 6:42 ` Alexander Dahl
2020-10-24 6:48 ` Pavel Machek [this message]
2020-10-24 9:16 ` Luca Weiss
2020-10-24 21:50 ` Dan Murphy
2020-10-24 19:34 ` Jacek Anaszewski
2020-10-25 10:54 ` Luca Weiss
2020-10-26 3:26 ` Bjorn Andersson
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=20201024064859.GB28478@amd \
--to=pavel@ucw.cz \
--cc=bjorn.andersson@linaro.org \
--cc=linux-leds@vger.kernel.org \
--cc=luca@z3ntu.xyz \
--cc=post@lespocky.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