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: <2315048.uTtSMl1LR1@ada>
Date:   Fri, 12 Mar 2021 09:31:58 +0100
From:   Alexander Dahl <ada@...rsis.com>
To:     linux-leds@...r.kernel.org
Cc:     Hermes Zhang <chenhui.zhang@...s.com>, Pavel Machek <pavel@....cz>,
        Dan Murphy <dmurphy@...com>, kernel@...s.com,
        Hermes Zhang <chenhuiz@...s.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] leds: leds-dual-gpio: Add dual GPIO LEDs driver

Hallo Hermes,

thanks for your effort.

Am Donnerstag, 11. März 2021, 14:04:08 CET schrieb Hermes Zhang:
> From: Hermes Zhang <chenhuiz@...s.com>
> 
> Introduce a new Dual GPIO LED driver. These two GPIOs LED will act as
> one LED as normal GPIO LED but give the possibility to change the
> intensity in four levels: OFF, LOW, MIDDLE and HIGH.

Interesting use case. Is there any real world hardware wired like that you 
could point to?

> +config LEDS_DUAL_GPIO
> +	tristate "LED Support for Dual GPIO connected LEDs"
> +	depends on LEDS_CLASS
> +	depends on GPIOLIB || COMPILE_TEST
> +	help
> +	  This option enables support for the two LEDs connected to GPIO
> +	  outputs. These two GPIO LEDs act as one LED in the sysfs and
> +	  perform different intensity by enable either one of them or both.

Well, although I never had time to implement that, I suspect that could 
conflict if someone will eventually write a driver for two pin dual color LEDs 
connected to GPIO pins.  We actually do that on our hardware and I know others 
do, too.

I asked about that back in 2019, see this thread:

https://www.spinics.net/lists/linux-leds/msg11665.html

At the time the multicolor framework was not yet merged, so today I would 
probably make something which either uses the multicolor framework or at least 
has a similar interface to userspace. However, it probably won't surprise you 
all, this is not highest priority on my ToDo list. ;-)

(What we actually do is pretend those are separate LEDs and ignore the 
conflicting case where both GPIOs are on and the LED is dark then.)

Greets
Alex



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ