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
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 -- Saluti, Fabio Pozzi
On Sat, Oct 6, 2012 at 4:20 AM, jeshwanth Kumar N K <jeshkumar555@gmail.com> wrote:
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.
Sent from my HTC
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
On Sat, Oct 06, 2012 at 01:50:55PM +0530, jeshwanth Kumar N K wrote:
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
participants (4)
-
devendra.aaru -
Fabio Pozzi -
jeshwanth Kumar N K -
Jonathan Neuschäfer