lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DBAPR10MB42198EA968C14B13B510834D8ACD9@DBAPR10MB4219.EURPRD10.PROD.OUTLOOK.COM>
Date:   Wed, 1 Sep 2021 11:24:13 +0000
From:   "hamza.farooq@...mens.com" <hamza.farooq@...mens.com>
To:     Pavel Machek <pavel@....cz>
CC:     Andy Shevchenko <andy.shevchenko@...il.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux LED Subsystem <linux-leds@...r.kernel.org>,
        Platform Driver <platform-driver-x86@...r.kernel.org>,
        "henning.schild@...mens.com" <henning.schild@...mens.com>,
        "jan.kiszka@...mens.com" <jan.kiszka@...mens.com>,
        "Haeussler, Gerd" <gerd.haeussler.ext@...mens.com>
Subject: RE: Define LEDs with mixed colors



> -----Original Message-----
> From: Pavel Machek <pavel@....cz>
> Sent: Wednesday, September 1, 2021 1:09 PM
> To: Farooq, Muhammad Hamza (DI FA CTR IPC PRC2)
> <hamza.farooq@...mens.com>
> Cc: Andy Shevchenko <andy.shevchenko@...il.com>; Linux Kernel Mailing
> List <linux-kernel@...r.kernel.org>; Linux LED Subsystem <linux-
> leds@...r.kernel.org>; Platform Driver <platform-driver-
> x86@...r.kernel.org>; Schild, Henning (T RDA IOT SES-DE)
> <henning.schild@...mens.com>; Kiszka, Jan (T RDA IOT)
> <jan.kiszka@...mens.com>; Haeussler, Gerd (ext) (DI FA CTR IPC PRC2)
> <gerd.haeussler.ext@...mens.com>
> Subject: Re: Define LEDs with mixed colors
> 
> Hi!
> 
> > I am toying with the idea of writing a multicolor LED GPIO driver. What
> would be the right way to define mixed color LEDs (for leds-gpio), in device
> tree or ACPI?
> > Consider the following:
> >
> > leds {
> > 	compatible = "gpio-leds";
> > 	led0 {
> > 		gpios = <&mcu_pio 0 GPIO_ACTIVE_LOW>;
> > 		color = <LED_COLOR_ID_RED>;
> > 	};
> >
> > 	led1 {
> > 		gpios = <&mcu_pio 1 GPIO_ACTIVE_HIGH>;
> > 		color = <LED_COLOR_ID_GREEN>;
> > 	};
> > 	led2 {
> > 		gpios = <&mcu_pio 0 GPIO_ACTIVE_LOW
> > 			&mcu_pio 1 GPIO_ACTIVE_LOW>;
> > 		color = <LED_COLOR_ID_AMBER>;
> > 	};
> > };
> >
> > This probably won't work as "gpios" seem to be single object in gpio-leds
> driver code, but what can I do to achieve something similar?
> > It is important to define this LED in DT/ACPI in order for the user app to see
> it in the /sys/class/led folder, without having to write platform-specific
> driver.
> >
> 
> So you have one package with red and green LED, each connected to one
> GPIO?
Right. It is possible to create orange color, and I want to use DT/ACPI to present this info to the userland.

> 
> Can you take a look at Documentation/leds/leds-class-multicolor.rst?
Couldn't find a hint there therefore this email thread. I might eventually write a multicolor led-gpio driver so want to know how to handle mixed LED.

> 
> Best regards,
> 								Pavel
> --
> http://www.livejournal.com/~pavelmachek

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ