Skip to contentSkip to conversation

Gpio interrupt shall pass the signal to application

DISCUSSION jeshwanth Kumar N K 4 participants 4 messages Oct 6, 2012

lore
Share & tools
lore
#1 lore raw

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 
#2 lore raw
In reply to jeshwanth Kumar N K
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

#3 lore raw
In reply to jeshwanth Kumar N K
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