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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZdThq8G/cgHeuI7/@duo.ucw.cz>
Date: Tue, 20 Feb 2024 18:30:19 +0100
From: Pavel Machek <pavel@....cz>
To: Lee Jones <lee@...nel.org>
Cc: Chris Packham <Chris.Packham@...iedtelesis.co.nz>,
	"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!

> > >> I'm looking for something that I figured must exists but maybe it's so
> > >> niche that no-one has bothered to upstream a driver for it.
> > >>
> > >> I have a requirement to support a 7-segment LED display[1] (one that can
> > >> display a single digit from 0-9). Hardware wise it's just a bunch of
> > >> individual GPIOs connected to each segment (plus an extra one for a
> > >> dot). I can't see anything obvious in drivers/leds but maybe I'm looking
> > >> in the wrong place. Or maybe it's the kind of thing on PC hardware that
> > >> is just driven by the BIOS without the operating system knowing about it.
> > >>
> > >> Is there an existing in-kernel driver for such a thing?
> > > Why would LEDs connected to a bunch of GPIOs in a specific fashion
> > > require a hardware driver?  Doesn't drivers/leds/leds-gpio.c already
> > > provide all the support you need?
> > Yes I could expose the individual segments as gpio-ledsbut it would be 
> > nicer if they worked in a more co-ordinated fashion so I didn't have to 
> > care about the individual segments and could just say "display 7" or 
> > "display 0".
> 
> Still not sure this sort of thing should be kernel-side.
> 
> Sounds more like the role of a library or middle-layer.

We do already have 7-segment support in auxdisplay. We should simply
use that interface. Simply create auxdisplay driver that uses gpios
and provides interface similar to what is already there.

(Of course, just using gpio library for userspace will be easier).

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