aboutsummaryrefslogtreecommitdiff
path: root/scripts/patch-kernel
diff options
context:
space:
mode:
authorDaniel Glöckner <[email protected]>2009-09-22 16:46:38 -0700
committerLinus Torvalds <[email protected]>2009-09-23 07:39:48 -0700
commitff77c352ae17768c61cfc36357f0a3904552f11c (patch)
tree195c102f75445654e87453cbce284b2f658d13a8 /scripts/patch-kernel
parentd120c17faeb391f5b4b99af8b1e190619934ecdd (diff)
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. [[email protected]: align ids to 16 bit ids; whitespace] Signed-off-by: Daniel Glöckner <[email protected]> Signed-off-by: David Brownell <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'scripts/patch-kernel')
0 files changed, 0 insertions, 0 deletions