Gpio interrupt shall pass the signal to application
Hello All,
I am writing a kernel module that shall pass the signal to application running in user space. So which signal i should use? And how to achieve this? Thank you.
Sent from my HTC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20121006/b9ab4fde/attachment.html
I think you could use sysfs_notify to send the notification and use select() or poll() to wait for changes in the sysfs file in the interrupt handler routine. You can find an example of this in the gpio-fan driver. Hope it helps
Signature · 5 lines
Saluti, Fabio Pozzi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20121006/a4cdb23e/attachment.html
Quoted 6 lines · jeshwanth Kumar N K
Hello All,
I am writing a kernel module that shall pass the signal to application running in user space. So which signal i should use? And how to achieve this? Thank you.
if any interrupt comes wake up a workqueue or a wait queue and interrupt the poll wait.
that makes your application wakeup from a select.
Quoted 8 lines
Sent from my HTC
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Quoted 3 lines · jeshwanth Kumar N K
Hello All,
I am writing a kernel module that shall pass the signal to application running in user space. So which signal i should use? And how to achieve this? Thank you.
What kind of information need to be transmitted from your device to the application?
Jonathan Neusch?fer