mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-17 14:30:00 +00:00
ff77c352ae
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> |
||
---|---|---|
.. | ||
bt8xxgpio.c | ||
gpiolib.c | ||
Kconfig | ||
langwell_gpio.c | ||
Makefile | ||
max732x.c | ||
max7301.c | ||
mc33880.c | ||
mcp23s08.c | ||
pca953x.c | ||
pcf857x.c | ||
pl061.c | ||
twl4030-gpio.c | ||
ucb1400_gpio.c | ||
vr41xx_giu.c | ||
wm831x-gpio.c | ||
xilinx_gpio.c |