Re: Gpio interrupt shall pass the signal to application
Hi Fabio, Thanks for the reply. Ya I got your point, and I did the same thing by exporting the sysfs gpio and poll for value attribute It works fine but the thing is time. Actually my interrupts may be every 50 micro seconds. So I thought of dealing in kernel mode itself. What's your suggestion ? Sent from my HTC ----- Reply message ----- From: "Fabio Pozzi" <pozzi.fabio@gmail.com> Date: Sat, Oct 6, 2012 2:29 pm Subject: Gpio interrupt shall pass the signal to application To: "jeshwanth Kumar N K" <jeshkumar555@gmail.com> Cc: "kernelnewbies" <kernelnewbies@kernelnewbies.org> 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
Hi Jeshwanth, I'm not an expert in kernel development, but I think that if you receive an interrupt every 50_micro_seconds IMHO you should definitely deal with it in kernel mode and maybe also think about enabling Real Time to be more certain about kernel latencies and scheduling. The context switch time between kernel and user space I think it's too long to delegate the elaboration to userspace. -- Fabio Pozzi
participants (2)
-
Fabio Pozzi -
jeshwanth Kumar N K