Hi there,


I am sorry for my poor knowledge on programming in C and linux.


I will greatly appreciate if anyone can enlighten me on how I can implement an ISR on one of the GPIOs line on the gumstix. I am hoping to initiate an high priority interrupt whenever a trigger edge is detected on the GPIO line (from GPIO(58) to GPIO (73)). I am using the function “gpio-event” (which has been developed by Dave Hylands) to detect the GPIO events.


I have been advised by Dave to look at an example code in gpio-event-drv.c for hints on implementing such interrupts. I was also reading the archive and I found this: http://www.nabble.com/PXA270-Interrupt-Help-td16275103.html which directed me to the command “request_irq” to register an interrupt. Am I right to assume that all the gpio monitoring events have to done within the interrupt dispatch function when the request_irq is called up. What I do not understand is the procedure to set up an interrupt properly, like having the need to initialize the interrupt ID and stop all other interrupts and proceed the ISR by using “spin_lock_irqsave” and “free_irq”.  Also how should I define the gpio line number in IRQ_GPIO and device ID?


I will greatly appreciate if anyone can direct me with some basic examples to set up the ISR to start with? In fact, I just need a simple ISR to execute a specific function (which then reads the gpio-events). Also does gumstix allows Non-Maskable Interrupts? Is any of the GPIOs line configurable to NMI? I assume that it will set the GPIO line to the highest priority, because I am hoping to detect the GPIO trigger pulses at a relatively high rate.


Thanks for any help in advance.