All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Neil Armstrong <narmstrong@baylibre.com>
Cc: Greg KH <gregkh@linuxfoundation.org>,
	Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	mark.rutland@arm.com,
	Jaghathiswari Rankappagounder Natarajan <jaghu@google.com>,
	devicetree@vger.kernel.org, openbmc@lists.ozlabs.org,
	linux@armlinux.org.uk, linux-kernel@vger.kernel.org,
	robh+dt@kernel.org, joel@jms.id.au,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH linux v1 0/4] Seven segment display support
Date: Wed, 14 Dec 2016 15:15:53 +0100	[thread overview]
Message-ID: <2512681.Wh85HyB8FH@wuerfel> (raw)
In-Reply-To: <ac324946-41da-c090-a0ca-78155611bb7e@baylibre.com>

On Wednesday, December 14, 2016 2:12:41 PM CET Neil Armstrong wrote:
> On 12/14/2016 01:56 PM, Greg KH wrote:
> > On Wed, Dec 14, 2016 at 01:45:30PM +0100, Thomas Petazzoni wrote:
> >> Hello,
> >>
> >> On Tue, 13 Dec 2016 23:55:00 -0800, Jaghathiswari Rankappagounder
> >> Natarajan wrote:
> >>
> >>> Documentation for the binding which provides an interface for adding clock,
> >>> data and clear signal GPIO lines to control seven segment display.
> >>>
> >>> The platform device driver provides an API for displaying on two 7-segment
> >>> displays, and implements the required bit-banging. The hardware assumed is
> >>> 74HC164 wired to two 7-segment displays.
> >>>
> >>> The character device driver implements the user-space API for letting a user
> >>> write to two 7-segment displays including any conversion methods necessary
> >>> to map the user input to two 7-segment displays.
> >>>
> >>> Adding clock, data and clear signal GPIO lines in the devicetree to control
> >>> seven segment display on zaius platform.
> >>>
> >>> The platform driver matches on the device tree node; the platform driver also
> >>> initializes the character device.
> >>>
> >>> Tested that the seven segment display works properly by writing to the
> >>> character device file on a EVB AST2500 board which also has 74HC164 wired
> >>> to two 7-segment displays.
> >>
> >> FWIW, I proposed a driver for seven segment displays back in 2013:
> >>
> >>    http://lists.infradead.org/pipermail/linux-arm-kernel/2013-January/139986.html
> >>
> >> And the feedback from Greg KH was: we don't need a driver for that, do
> >> it from userspace. See:
> >>
> >>    http://lists.infradead.org/pipermail/linux-arm-kernel/2013-January/139992.html
> >>
> >> So: good luck 
> > 
> > Did anyone ever write a library for this type of thing?
> > 
> > Again, I don't want to see one-off drivers for random devices like this
> > that should be able to all be controlled from userspace in a common
> > manner.  Much like we did for fingerprint readers a long long time
> > ago...
> > 

> Actually, it's more than a random interface, a lot of SoCs and boards actually have such displays
> and it's a pity to use UIO, sysfs gpio bitbanging and all sort of ugly stuff to only print a few
> characters a simple and clean driver could achieve.
> Some very well known SoCs even have integrated registers to lower the BOM and bypass the need for
> a 74HC164 like component and avoid gpio bit banging.
> 
> My personal concern is that you could also need to drive more segments, thus 7-segments
> is too restrictive.
> 
> But this driver is well structured, the gpio-bitbanging sub-driver is welcome.

Maybe we can find a way to fit this into the existing drivers/leds/ subsystem?

That already supports blinking, brightness and colour attributes of LEDs,
so could this be extended to support (one of) digit, number, character
or string with a common sysfs attribute and a way to hook up a led driver
to that?

	Arnd

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
To: Neil Armstrong <narmstrong-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
Cc: Greg KH
	<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
	Thomas Petazzoni
	<thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
	mark.rutland-5wv7dgnIgG8@public.gmane.org,
	Jaghathiswari Rankappagounder Natarajan
	<jaghu-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	openbmc-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	linux-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	joel-U3u1mxZcP9KHXe+LvDLADg@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH linux v1 0/4] Seven segment display support
Date: Wed, 14 Dec 2016 15:15:53 +0100	[thread overview]
Message-ID: <2512681.Wh85HyB8FH@wuerfel> (raw)
In-Reply-To: <ac324946-41da-c090-a0ca-78155611bb7e-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>

On Wednesday, December 14, 2016 2:12:41 PM CET Neil Armstrong wrote:
> On 12/14/2016 01:56 PM, Greg KH wrote:
> > On Wed, Dec 14, 2016 at 01:45:30PM +0100, Thomas Petazzoni wrote:
> >> Hello,
> >>
> >> On Tue, 13 Dec 2016 23:55:00 -0800, Jaghathiswari Rankappagounder
> >> Natarajan wrote:
> >>
> >>> Documentation for the binding which provides an interface for adding clock,
> >>> data and clear signal GPIO lines to control seven segment display.
> >>>
> >>> The platform device driver provides an API for displaying on two 7-segment
> >>> displays, and implements the required bit-banging. The hardware assumed is
> >>> 74HC164 wired to two 7-segment displays.
> >>>
> >>> The character device driver implements the user-space API for letting a user
> >>> write to two 7-segment displays including any conversion methods necessary
> >>> to map the user input to two 7-segment displays.
> >>>
> >>> Adding clock, data and clear signal GPIO lines in the devicetree to control
> >>> seven segment display on zaius platform.
> >>>
> >>> The platform driver matches on the device tree node; the platform driver also
> >>> initializes the character device.
> >>>
> >>> Tested that the seven segment display works properly by writing to the
> >>> character device file on a EVB AST2500 board which also has 74HC164 wired
> >>> to two 7-segment displays.
> >>
> >> FWIW, I proposed a driver for seven segment displays back in 2013:
> >>
> >>    http://lists.infradead.org/pipermail/linux-arm-kernel/2013-January/139986.html
> >>
> >> And the feedback from Greg KH was: we don't need a driver for that, do
> >> it from userspace. See:
> >>
> >>    http://lists.infradead.org/pipermail/linux-arm-kernel/2013-January/139992.html
> >>
> >> So: good luck 
> > 
> > Did anyone ever write a library for this type of thing?
> > 
> > Again, I don't want to see one-off drivers for random devices like this
> > that should be able to all be controlled from userspace in a common
> > manner.  Much like we did for fingerprint readers a long long time
> > ago...
> > 

> Actually, it's more than a random interface, a lot of SoCs and boards actually have such displays
> and it's a pity to use UIO, sysfs gpio bitbanging and all sort of ugly stuff to only print a few
> characters a simple and clean driver could achieve.
> Some very well known SoCs even have integrated registers to lower the BOM and bypass the need for
> a 74HC164 like component and avoid gpio bit banging.
> 
> My personal concern is that you could also need to drive more segments, thus 7-segments
> is too restrictive.
> 
> But this driver is well structured, the gpio-bitbanging sub-driver is welcome.

Maybe we can find a way to fit this into the existing drivers/leds/ subsystem?

That already supports blinking, brightness and colour attributes of LEDs,
so could this be extended to support (one of) digit, number, character
or string with a common sysfs attribute and a way to hook up a led driver
to that?

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH linux v1 0/4] Seven segment display support
Date: Wed, 14 Dec 2016 15:15:53 +0100	[thread overview]
Message-ID: <2512681.Wh85HyB8FH@wuerfel> (raw)
In-Reply-To: <ac324946-41da-c090-a0ca-78155611bb7e@baylibre.com>

On Wednesday, December 14, 2016 2:12:41 PM CET Neil Armstrong wrote:
> On 12/14/2016 01:56 PM, Greg KH wrote:
> > On Wed, Dec 14, 2016 at 01:45:30PM +0100, Thomas Petazzoni wrote:
> >> Hello,
> >>
> >> On Tue, 13 Dec 2016 23:55:00 -0800, Jaghathiswari Rankappagounder
> >> Natarajan wrote:
> >>
> >>> Documentation for the binding which provides an interface for adding clock,
> >>> data and clear signal GPIO lines to control seven segment display.
> >>>
> >>> The platform device driver provides an API for displaying on two 7-segment
> >>> displays, and implements the required bit-banging. The hardware assumed is
> >>> 74HC164 wired to two 7-segment displays.
> >>>
> >>> The character device driver implements the user-space API for letting a user
> >>> write to two 7-segment displays including any conversion methods necessary
> >>> to map the user input to two 7-segment displays.
> >>>
> >>> Adding clock, data and clear signal GPIO lines in the devicetree to control
> >>> seven segment display on zaius platform.
> >>>
> >>> The platform driver matches on the device tree node; the platform driver also
> >>> initializes the character device.
> >>>
> >>> Tested that the seven segment display works properly by writing to the
> >>> character device file on a EVB AST2500 board which also has 74HC164 wired
> >>> to two 7-segment displays.
> >>
> >> FWIW, I proposed a driver for seven segment displays back in 2013:
> >>
> >>    http://lists.infradead.org/pipermail/linux-arm-kernel/2013-January/139986.html
> >>
> >> And the feedback from Greg KH was: we don't need a driver for that, do
> >> it from userspace. See:
> >>
> >>    http://lists.infradead.org/pipermail/linux-arm-kernel/2013-January/139992.html
> >>
> >> So: good luck 
> > 
> > Did anyone ever write a library for this type of thing?
> > 
> > Again, I don't want to see one-off drivers for random devices like this
> > that should be able to all be controlled from userspace in a common
> > manner.  Much like we did for fingerprint readers a long long time
> > ago...
> > 

> Actually, it's more than a random interface, a lot of SoCs and boards actually have such displays
> and it's a pity to use UIO, sysfs gpio bitbanging and all sort of ugly stuff to only print a few
> characters a simple and clean driver could achieve.
> Some very well known SoCs even have integrated registers to lower the BOM and bypass the need for
> a 74HC164 like component and avoid gpio bit banging.
> 
> My personal concern is that you could also need to drive more segments, thus 7-segments
> is too restrictive.
> 
> But this driver is well structured, the gpio-bitbanging sub-driver is welcome.

Maybe we can find a way to fit this into the existing drivers/leds/ subsystem?

That already supports blinking, brightness and colour attributes of LEDs,
so could this be extended to support (one of) digit, number, character
or string with a common sysfs attribute and a way to hook up a led driver
to that?

	Arnd

  reply	other threads:[~2016-12-14 14:16 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-14  7:55 [PATCH linux v1 0/4] Seven segment display support Jaghathiswari Rankappagounder Natarajan
2016-12-14  7:55 ` Jaghathiswari Rankappagounder Natarajan
2016-12-14  7:55 ` [PATCH linux v1 1/4] Documentation: dt-bindings: Document bindings for seven " Jaghathiswari Rankappagounder Natarajan
2016-12-14  7:55   ` Jaghathiswari Rankappagounder Natarajan
2016-12-14  7:55   ` Jaghathiswari Rankappagounder Natarajan
2016-12-14  7:55 ` [PATCH linux v1 2/4] drivers: misc: Character device driver for seven segment display Jaghathiswari Rankappagounder Natarajan
2016-12-14  7:55   ` Jaghathiswari Rankappagounder Natarajan
2016-12-14  7:55   ` Jaghathiswari Rankappagounder Natarajan
2016-12-14 12:32   ` Russell King - ARM Linux
2016-12-14 12:32     ` Russell King - ARM Linux
2016-12-14 12:32     ` Russell King - ARM Linux
2016-12-14  7:55 ` [PATCH linux v1 3/4] drivers: misc: Platform driver for seven segment display support Jaghathiswari Rankappagounder Natarajan
2016-12-14  7:55   ` Jaghathiswari Rankappagounder Natarajan
2016-12-14  7:55 ` [PATCH linux v1 4/4] arm: dts: Add dt-binding to support seven segment display on zaius Jaghathiswari Rankappagounder Natarajan
2016-12-14  7:55   ` Jaghathiswari Rankappagounder Natarajan
2016-12-14  8:55   ` Arnd Bergmann
2016-12-14  8:55     ` Arnd Bergmann
2016-12-14  8:55     ` Arnd Bergmann
2016-12-14  9:00     ` Arnd Bergmann
2016-12-14  9:00       ` Arnd Bergmann
2016-12-14 11:06       ` Russell King - ARM Linux
2016-12-14 11:06         ` Russell King - ARM Linux
2016-12-14 11:06         ` Russell King - ARM Linux
2016-12-14 11:40         ` Russell King - ARM Linux
2016-12-14 11:40           ` Russell King - ARM Linux
2016-12-15 23:07           ` Linus Walleij
2016-12-15 23:07             ` Linus Walleij
2016-12-15 23:07             ` Linus Walleij
2016-12-15 23:07             ` Linus Walleij
2016-12-14  9:02   ` Joel Stanley
2016-12-14  9:02     ` Joel Stanley
2016-12-14  9:02     ` Joel Stanley
2016-12-14  9:02     ` Joel Stanley
2016-12-14 12:45 ` [PATCH linux v1 0/4] Seven segment display support Thomas Petazzoni
2016-12-14 12:45   ` Thomas Petazzoni
2016-12-14 12:45   ` Thomas Petazzoni
2016-12-14 12:56   ` Greg KH
2016-12-14 12:56     ` Greg KH
2016-12-14 12:56     ` Greg KH
2016-12-14 13:12     ` Neil Armstrong
2016-12-14 13:12       ` Neil Armstrong
2016-12-14 14:15       ` Arnd Bergmann [this message]
2016-12-14 14:15         ` Arnd Bergmann
2016-12-14 14:15         ` Arnd Bergmann
2016-12-14 20:05         ` David Daney
2016-12-14 20:05           ` David Daney
2016-12-20  4:06           ` Jaghathiswari Rankappagounder Natarajan
2016-12-20  4:06             ` Jaghathiswari Rankappagounder Natarajan
2016-12-14 16:50       ` Greg KH
2016-12-14 16:50         ` Greg KH
2016-12-14 14:35 ` Patrick Williams
2016-12-14 23:23   ` Rob Lippert
2017-02-07  4:03 Jaghathiswari Rankappagounder Natarajan
2017-02-09  3:08 ` Joel Stanley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2512681.Wh85HyB8FH@wuerfel \
    --to=arnd@arndb.de \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jaghu@google.com \
    --cc=joel@jms.id.au \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=narmstrong@baylibre.com \
    --cc=openbmc@lists.ozlabs.org \
    --cc=robh+dt@kernel.org \
    --cc=thomas.petazzoni@free-electrons.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.