linux/drivers/gpio
Daniel Glöckner ff77c352ae gpiolib: allow poll() on value
Many gpio chips allow to generate interrupts when the value of a pin
changes.  This patch gives usermode application the opportunity to make
use of this feature by calling poll(2) on the /sys/class/gpio/gpioN/value
sysfs file.  The edge to trigger can be set in the edge file in the same
directory.  Possible values are "none", "rising", "falling", and "both".

Using level triggers is not possible with current sysfs since nothing
changes the GPIO value (and the IRQ keeps triggering).  Edge triggering
will "just work".  Note that if there was an event between read() and
poll(), the poll() returns immediately.

Also note that this version only supports true GPIO interrupts.  Some
later patch might be able to synthesize this behavior by timer-driven
polling; some systems seem to need that.

[dbrownell@users.sourceforge.net: align ids to 16 bit ids; whitespace]
Signed-off-by: Daniel Glöckner <dg@emlix.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-23 07:39:48 -07:00
..
bt8xxgpio.c gpio: include <linux/gpio.h> not <asm/gpio.h> 2009-09-23 07:39:48 -07:00
gpiolib.c gpiolib: allow poll() on value 2009-09-23 07:39:48 -07:00
Kconfig gpio: add Intel Moorestown Platform Langwell chip gpio driver 2009-09-23 07:39:48 -07:00
langwell_gpio.c gpio: add Intel Moorestown Platform Langwell chip gpio driver 2009-09-23 07:39:48 -07:00
Makefile gpio: add Intel Moorestown Platform Langwell chip gpio driver 2009-09-23 07:39:48 -07:00
max732x.c gpio: fix probe() error return in gpio driver probes 2009-01-15 16:39:35 -08:00
max7301.c spi: prefix modalias with "spi:" 2009-09-23 07:39:43 -07:00
mc33880.c gpio: add MC33880 driver 2009-09-23 07:39:46 -07:00
mcp23s08.c gpio: include <linux/gpio.h> not <asm/gpio.h> 2009-09-23 07:39:48 -07:00
pca953x.c gpio: include <linux/gpio.h> not <asm/gpio.h> 2009-09-23 07:39:48 -07:00
pcf857x.c gpio: include <linux/gpio.h> not <asm/gpio.h> 2009-09-23 07:39:48 -07:00
pl061.c gpio: pl061: fix IRQ handling for GPIOs >= PL061_GPIO_NR 2009-06-30 18:56:01 -07:00
twl4030-gpio.c twl4030-gpio: cleanup debounce 2009-01-06 15:59:25 -08:00
ucb1400_gpio.c mfd/gpio: add a GPIO interface to the UCB1400 MFD chip driver via gpiolib 2009-09-23 07:39:48 -07:00
vr41xx_giu.c headers: smp_lock.h redux 2009-07-12 12:22:34 -07:00
wm831x-gpio.c gpio: Add WM831X GPIO driver 2009-09-17 09:47:01 +02:00
xilinx_gpio.c