Re: Clarification regarding multicolor leds

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx.

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@xxxxxxxxxx/
> > 
> > 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: signature.asc
Description: Digital signature


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux