On Mon, 2008-04-28 at 12:39 -0700, David Brownell wrote:
Righteo, so if the kernel explicitly gpio_export()s something, it won't
be gpio_request()ed allowing multiple "owners" making driver debugging
easier. Most of the time though we don't want to be able to clobber the
kernel's gpios so the control file wizardry isn't so much to cope with
incomplete board support, rather it's the way all regular (ie
non-driver-debugging) gpio access is started..? Or do you class any
situation where userspace needs primary gpio control as a BSP omission
as there Should Be a formal in-kernel driver for it all?
Also, gpio number discovery can be done through the debugfs interface
already in gpiolib but once you've got a userspace gpio interface which
relies on gpio numbering like this that information ceases to be simple
debugging and becomes pretty mission-critical. IMO it would make more
sense to shuffle it in to /sys/class/gpio with all this stuff or at
least offer a cut-down chip-to-range mapping in a file here.
Which is good for simplicity but makes async notification kinda tricky.
I would suggest that a lack of pin-change signalling is going to be a
problem for people who've become accustomed to having it in their
out-of-tree interfaces. Probably not a showstopper here but certainly
something which will slow the uptake of this interface.
[had some comments regarding the code but it seems akpm covered them all
already :-)]
--