Re: [patch/rfc 2.6.25-git] gpio: sysfs interface

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: David Brownell
Date: Monday, April 28, 2008 - 5:44 pm

On Monday 28 April 2008, Ben Nizette wrote:

The gpio_export() call requires someone (the caller!) to
have requested the GPIO already.  The "one owner" rule is
not being changed.



Right.  Not unless we're debugging the driver managing
those GPIOs.



Well, I wouldn't call that "regular"!  But then, I don't
have this "use GPIOs from userspace" focus.  To me, that's
the exception not the rule.



I suppose I'd prefer to see a formal gpio_export() call from
the kernel as part of the BSP, if that's the model for how that
particular board stack should be used.  But I suspect there will
be differing opinions on that point, especially from folk who
avoid custom kernels for whatever reasons.  (Like, "that binary
has been qualified, this one hasn't.")

 

... intended purely for debugging, not for use with production
systems ...



I don't follow what you're saying here.  GPIO numbering is deeply
specific to the hardware; so I'd say the relevant hardware docs are
what become mission-critical.  The kernel can't know when some
field update has rewired a bunch of GPIOs, for example...

Trent pointed out that dynamic range assignment can make trouble,
so I can see some help might be needed here.  Were you suggesting
something like a /sys/class/gpio/chips file with contents like

	0-15	gpio
	16-31	gpio
	32-47	gpio
	48-63	gpio
	192-207	mpuio
	208-213	tps65010

(Matching a stock OMAP 5912 OSK board, for what it's worth.)



Sysfs attributes are supposed to be pollable.  I've not done it,
but fs/sysfs/file.c::sysfs_notify() looks relevant ...



We accept patches.   Even patches on top of patches.  ;)

- Dave
 
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch/rfc 2.6.25-git] gpio: sysfs interface, David Brownell, (Mon Apr 28, 12:39 pm)
Re: [patch/rfc 2.6.25-git] gpio: sysfs interface, Andrew Morton, (Mon Apr 28, 1:46 pm)
Re: [patch/rfc 2.6.25-git] gpio: sysfs interface, Ben Nizette, (Mon Apr 28, 4:01 pm)
Re: [patch/rfc 2.6.25-git] gpio: sysfs interface, Trent Piepho, (Mon Apr 28, 4:09 pm)
Re: [patch/rfc 2.6.25-git] gpio: sysfs interface, David Brownell, (Mon Apr 28, 4:28 pm)
Re: [patch/rfc 2.6.25-git] gpio: sysfs interface, David Brownell, (Mon Apr 28, 5:44 pm)
Re: [patch/rfc 2.6.25-git] gpio: sysfs interface, David Brownell, (Mon Apr 28, 5:45 pm)
Re: [patch/rfc 2.6.25-git] gpio: sysfs interface, Ben Nizette, (Mon Apr 28, 5:47 pm)
Re: [patch/rfc 2.6.25-git] gpio: sysfs interface, Ben Nizette, (Mon Apr 28, 6:58 pm)
Re: [patch/rfc 2.6.25-git] gpio: sysfs interface, Andrew Morton, (Mon Apr 28, 7:54 pm)
Re: [patch/rfc 2.6.25-git] gpio: sysfs interface, Greg KH, (Mon Apr 28, 8:42 pm)
Re: [patch/rfc 2.6.25-git] gpio: sysfs interface, David Brownell, (Mon Apr 28, 8:44 pm)
Re: [patch/rfc 2.6.25-git] gpio: sysfs interface, Ben Nizette, (Mon Apr 28, 9:47 pm)
Re: [patch/rfc 2.6.25-git] gpio: sysfs interface, Trent Piepho, (Mon Apr 28, 10:48 pm)
Re: [patch/rfc 2.6.25-git] gpio: sysfs interface, Trent Piepho, (Mon Apr 28, 11:17 pm)
Re: [patch/rfc 2.6.25-git] gpio: sysfs interface, Ben Nizette, (Tue Apr 29, 5:35 am)
Re: [patch/rfc 2.6.25-git] gpio: sysfs interface, Trent Piepho, (Tue Apr 29, 11:15 am)
Re: [patch/rfc 2.6.25-git] gpio: sysfs interface, David Brownell, (Tue Apr 29, 11:45 am)
Re: [patch/rfc 2.6.25-git] gpio: sysfs interface, Andrew Morton, (Tue Apr 29, 12:09 pm)
Re: [patch/rfc 2.6.25-git] gpio: sysfs interface, David Brownell, (Tue Apr 29, 2:28 pm)
Re: [patch/rfc 2.6.25-git] gpio: sysfs interface, David Brownell, (Tue Apr 29, 2:55 pm)
Re: [patch/rfc 2.6.25-git] gpio: sysfs interface, David Brownell, (Tue Apr 29, 2:56 pm)
Re: [patch/rfc 2.6.25-git] gpio: sysfs interface, David Brownell, (Tue Apr 29, 3:39 pm)
Re: [patch/rfc 2.6.25-git] gpio: sysfs interface, Ben Nizette, (Tue Apr 29, 4:29 pm)
Re: [patch/rfc 2.6.25-git] gpio: sysfs interface, Trent Piepho, (Tue Apr 29, 5:49 pm)
Re: [patch/rfc 2.6.25-git] gpio: sysfs interface, David Brownell, (Tue Apr 29, 6:04 pm)
Re: [patch/rfc 2.6.25-git] gpio: sysfs interface, Ben Nizette, (Tue Apr 29, 7:08 pm)
Re: [patch/rfc 2.6.25-git] gpio: sysfs interface, Trent Piepho, (Tue Apr 29, 8:13 pm)
Re: [patch/rfc 2.6.25-git] gpio: sysfs interface, Ben Nizette, (Wed Apr 30, 3:33 am)
Re: [patch/rfc 2.6.25-git] gpio: sysfs interface, David Brownell, (Wed Apr 30, 10:42 am)
Re: [patch/rfc 2.6.25-git] gpio: sysfs interface, David Brownell, (Wed Apr 30, 10:49 am)
[patch/rfc 2.6.25-git v2] gpio: sysfs interface, David Brownell, (Wed Apr 30, 2:34 pm)
Re: [patch/rfc 2.6.25-git v2] gpio: sysfs interface, Trent Piepho, (Wed Apr 30, 3:47 pm)
Re: [patch/rfc 2.6.25-git v2] gpio: sysfs interface, Ben Nizette, (Wed Apr 30, 4:14 pm)
Re: [patch/rfc 2.6.25-git v2] gpio: sysfs interface, Ben Nizette, (Wed Apr 30, 4:28 pm)
Re: [patch/rfc 2.6.25-git v2] gpio: sysfs interface, David Brownell, (Wed Apr 30, 7:08 pm)
Re: [patch/rfc 2.6.25-git v2] gpio: sysfs interface, David Brownell, (Wed Apr 30, 7:12 pm)
Re: [patch/rfc 2.6.25-git v2] gpio: sysfs interface, Trent Piepho, (Wed Apr 30, 8:41 pm)
Re: [patch/rfc 2.6.25-git v2] gpio: sysfs interface, David Brownell, (Wed Apr 30, 9:35 pm)
Re: [patch/rfc 2.6.25-git v2] gpio: sysfs interface, Trent Piepho, (Thu May 1, 2:16 pm)
Re: [patch/rfc 2.6.25-git v2] gpio: sysfs interface, David Brownell, (Thu May 1, 2:40 pm)
Re: [patch/rfc 2.6.25-git] gpio: sysfs interface, Pavel Machek, (Fri May 2, 1:36 pm)
Re: [patch/rfc 2.6.25-git v2] gpio: sysfs interface, David Brownell, (Fri May 2, 7:58 pm)
Re: [patch/rfc 2.6.25-git v2] gpio: sysfs interface, David Brownell, (Fri May 2, 8:05 pm)
Re: [patch/rfc 2.6.25-git] gpio: sysfs interface, David Brownell, (Sat May 17, 3:14 pm)
[patch 2.6.26-rc2-git] gpio: sysfs interface, David Brownell, (Sat May 17, 5:36 pm)
Re: [patch/rfc 2.6.25-git] gpio: sysfs interface, Ben Nizette, (Sat May 17, 9:55 pm)
Re: [patch/rfc 2.6.25-git] gpio: sysfs interface, Pavel Machek, (Mon May 19, 3:39 pm)
Re: [patch/rfc 2.6.25-git] gpio: sysfs interface, David Brownell, (Mon May 19, 6:26 pm)
Re: [patch 2.6.26-rc2-git] gpio: sysfs interface, Andrew Morton, (Tue May 20, 12:17 am)
Re: [patch/rfc 2.6.25-git] gpio: sysfs interface, Pavel Machek, (Tue May 20, 1:02 am)