devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
To: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>,
	Thomas Petazzoni
	<thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
Cc: Lior Amsalem <alior-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>,
	Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>,
	Jason Cooper <jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org>,
	Greg Kroah-Hartman
	<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH 3.9 1/3] misc: new driver for GPIO-connected 7-segment displays
Date: Fri, 08 Feb 2013 22:38:22 +0000	[thread overview]
Message-ID: <20130208223822.4204A3E2C27@localhost> (raw)
In-Reply-To: <201301072141.48487.arnd-r2nGTMty4D4@public.gmane.org>

On Mon, 7 Jan 2013 21:41:48 +0000, Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org> wrote:
> On Monday 07 January 2013, Thomas Petazzoni wrote:
> > Dear Arnd Bergmann,
> > 
> > On Mon, 7 Jan 2013 19:43:39 +0000, Arnd Bergmann wrote:
> > 
> > > >  .../devicetree/bindings/misc/gpio-7seg.txt         |   18 +++
> > > >  drivers/misc/Kconfig                               |   13 ++
> > > >  drivers/misc/Makefile                              |    1 +
> > > >  drivers/misc/gpio-7seg.c                           |  168 ++++++++++++++++++++
> > > 
> > > I wonder if it would make sense to merge this into the LED subsystem
> > > rather than having it as a standalone driver.
> > 
> > Hum, maybe. How do you see it fitting inside the LED subsystem? The
> > purpose of the device is quite different in its userspace to kernel
> > interface, no?
> 
> The LED subsystem can be used by both in-kernel and by user space
> front-ends. It currently supports on/off, blinking and variable
> brightness LEDs. Adding 7-segment LEDs may be a stretch but also
> would fit into the same basic interface I think.
> 
> In addition, it would not have to be GPIO based, although that may
> be the only implementation we need for the foreseeable future.
> Well, unless you make a driver for PC-style "port-0x80" PCI
> cards.
> 
> 
> > > > +	sdev->dev_attr.attr.name = "value";
> > > > +	sdev->dev_attr.attr.mode = S_IRUGO | S_IWUGO;
> > > > +	sdev->dev_attr.show = gpio_7seg_show;
> > > > +	sdev->dev_attr.store = gpio_7seg_store;
> > > 
> > > Any reason why you are not using the DEVICE_ATTR macro?
> > 
> > DEVICE_ATTR declares the structure, and I wanted one per gpio_7seg
> > device, which is dynamically allocated, so I thought that using
> > DEVICE_ATTR was not possible. But now that you point this, I realize
> > that I was stupid. I can perfectly live with one single global 'struct
> > device_attribute' that I register to several devices using
> > device_create_file(), no?
> 
> Correct.
> 
> > That said, is it worth the effort to continue polishing this driver,
> > after seeing the feedback from Greg about it? I don't mind working on
> > it more and fix the problems of course, but if the general answer is
> > that we don't want such a driver in the kernel, then I'd better not
> > spend more time on this.
> 
> I only saw the discussion after I had sent my reply. I think that
> this driver in the form of a drivers/misc sysfs driver is not worth
> pursuing, but it may still be possible to integrate it nicely into
> the LED framework.

I also definitely think it should be a kernel driver. This is the sort
of low level device useful for debugging that I want available to other
kernel modules.

g.

  parent reply	other threads:[~2013-02-08 22:38 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-07 16:42 [PATCH 3.9] Driver for 7-segment displays connected over GPIOs Thomas Petazzoni
2013-01-07 16:42 ` [PATCH 3.9 1/3] misc: new driver for GPIO-connected 7-segment displays Thomas Petazzoni
     [not found]   ` <1357576928-29133-2-git-send-email-thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2013-01-07 19:43     ` Arnd Bergmann
     [not found]       ` <201301071943.40074.arnd-r2nGTMty4D4@public.gmane.org>
2013-01-07 19:58         ` Thomas Petazzoni
2013-01-07 21:41           ` Arnd Bergmann
     [not found]             ` <201301072141.48487.arnd-r2nGTMty4D4@public.gmane.org>
2013-02-08 22:38               ` Grant Likely [this message]
2013-02-08 22:35     ` Grant Likely
2013-01-07 16:42 ` [PATCH 3.9 2/3] arm: mvebu: add the 7-segment display DT informations to Armada 370 DB Thomas Petazzoni
2013-01-07 16:42 ` [PATCH 3.9 3/3] arm: mvebu: add the 7-segment display DT informations to Armada XP DB Thomas Petazzoni
     [not found]   ` <1357576928-29133-4-git-send-email-thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2013-02-08 22:39     ` Grant Likely
     [not found] ` <1357576928-29133-1-git-send-email-thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2013-01-07 16:48   ` [PATCH 3.9] Driver for 7-segment displays connected over GPIOs Greg Kroah-Hartman
     [not found]     ` <20130107164845.GA2911-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2013-01-07 17:07       ` Thomas Petazzoni
2013-01-07 17:23         ` Greg Kroah-Hartman
     [not found]           ` <20130107172340.GA32401-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2013-01-07 17:40             ` Thomas Petazzoni
2013-01-07 17:43               ` Thomas Petazzoni
2013-01-07 17:56                 ` H Hartley Sweeten
     [not found]                   ` <ADE657CA350FB648AAC2C43247A983F00206D6C98E38-gaq956PjLg32KbjnnMDalRurcAul1UnsRrxOEX5GOmysTnJN9+BGXg@public.gmane.org>
2013-01-07 18:02                     ` Jason Cooper
2013-01-07 18:06                 ` Russell King - ARM Linux
2013-01-07 17:53             ` Thomas Petazzoni
2013-01-07 18:36               ` Greg Kroah-Hartman
     [not found]                 ` <20130107183642.GA26612-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2013-01-07 18:38                   ` Thomas Petazzoni
2013-01-07 23:05   ` Linus Walleij
2013-02-09 16:28     ` Pavel Machek

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=20130208223822.4204A3E2C27@localhost \
    --to=grant.likely-s3s/wqlpoipyb63q8fvjnq@public.gmane.org \
    --cc=alior-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org \
    --cc=andrew-g2DYL2Zd6BY@public.gmane.org \
    --cc=arnd-r2nGTMty4D4@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
    --cc=jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).