Messages in this thread | | | Date | Thu, 2 Jul 2009 14:15:29 +0300 | Subject | Re: [PATCH v2] gpiolib: allow poll(2) on gpio value | From | Jani Nikula <> |
| |
On Thu, Jul 2, 2009 at 2:05 AM, David Brownell<david-b@pacbell.net> wrote: > On Wednesday 10 June 2009, Daniel Glöckner wrote: >> 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". > > Looks pretty clean. Comments from anyone else?
I'd appreciate a kernel side interface to gpio_setup_irq functionality as well; now gpio_export from kernel won't setup support for poll(2) nor is there any possibility to do so. Having said that, it can be done in another patch, another day, I don't want that to be holding this patch back.
And I guess it might also be argued that anyone wanting to poll(2) can setup edge triggering from user space when needed. Other thoughts on that?
BR, Jani. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |