On Sat, 22 Sep 2007 11:59:16 -0700, David Brownell <david-b@xxxxxxxxxxx> wrote: > > I think there were some discussions about userspace API for GPIO on > > LKML, but cannot remember the detail. > > > > David, give us a comment please? > > It's not yet platform-neutral even given those issues; see below. > And it's insufficient by itself, which is the main technical point > I'd raise: without even udev/mdev hooks, it needs manual setup. > > I don't think anyone has yet *proposed* a platform-neutral userspace > interface to GPIOs yet. They all seem to include at least platform > specific pinmux setup ... which is probably inevitable, but that > would seem to need abstracting into platform-specific hooks. > > There have been a few folk expressing interest in a userspace GPIO > interface, and a few system-specific examples. The most flexible ones > that come to mind are on Gumstix PXA2xx boards. One enables GPIO > IRQs through a gpio-events module; and a /proc/gpio/GPIOnn interface > monitors all the pins and their configurations (which may mean they > aren't used for GPIOs at all). On some AVR32 boards, Atmel had a > (less capable) configfs interface, mostly used for LED access. Thank you pointing out those issues. It seems things are much complicated than I was thinking of... > More detailed comments are embedded below. And these comments help us understanding how to use and implement the GPIO API. Thanks! --- Atsushi Nemoto