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: <ZdhNlUotGJCklJTs@duo.ucw.cz>
Date: Fri, 23 Feb 2024 08:47:33 +0100
From: Pavel Machek <pavel@....cz>
To: Chris Packham <Chris.Packham@...iedtelesis.co.nz>
Cc: Andy Shevchenko <andy.shevchenko@...il.com>,
	Geert Uytterhoeven <geert@...ux-m68k.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
	"lee@...nel.org" <lee@...nel.org>,
	"linux-leds@...r.kernel.org" <linux-leds@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: Linux support for a 7 segment LED display

Hi!

> > Right, but also with some additional properties, like
> > - type of the indicator (7, 14, etc segments, for now we have only
> > these two supported)
> > - use-dot (+1 led per each digit)
> > - characters (how many digits we have, so we need respective amount of GPIOs)
> >
> > With this it's indeed belongs directly to auxdisplay as we have almost
> > everything is done already there.
> 
> I've been playing about with this. I've got an auxdisplay driver that's 
> basically working (I won't bother spamming list with it yet). But I'm 
> wondering how I'd represent multiple characters. I kind of feel the 
> natural representation would be something like.
> 
>          led-7seg {
>                  compatible = "generic,7-segment-on-gpio";
>                  char-0 {
>                      segment-gpios = <&gpio 0 GPIO_ACTIVE_LOW
>                                       &gpio 1 GPIO_ACTIVE_LOW
>                                       &gpio 2 GPIO_ACTIVE_LOW
>                                       &gpio 3 GPIO_ACTIVE_LOW
>                                       &gpio 4 GPIO_ACTIVE_LOW
>                                       &gpio 5 GPIO_ACTIVE_LOW
>                                       &gpio 6 GPIO_ACTIVE_LOW>;
>                  };
>                  char-1 {
>                      segment-gpios = <&gpio 8 GPIO_ACTIVE_LOW
>                                       &gpio 9 GPIO_ACTIVE_LOW
>                                       &gpio 10 GPIO_ACTIVE_LOW
>                                       &gpio 11 GPIO_ACTIVE_LOW
>                                       &gpio 12 GPIO_ACTIVE_LOW
>                                       &gpio 13 GPIO_ACTIVE_LOW
>                                       &gpio 14 GPIO_ACTIVE_LOW>;
>                  };
>          };
> 
> But having those sub-nodes means I can't just use devm_gpiod_get_array() 
> instead I'd have to use device_for_each_child_node() and 
> devm_fwnode_gpiod_get_index(). Am I missing something? I could do away 
> with the sub-nodes and have properties like "segment-0-gpios", 
> "segment-1-gpios" but that feels awkward.

One solution would be to treat separate digits as separata devices
:-).

Other would be saying you don't have hardware for that, and make it
someone else's future problem.

Best regards,
								Pavel
-- 
People of Russia, stop Putin before his war on Ukraine escalates.

Download attachment "signature.asc" of type "application/pgp-signature" (196 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ