Hi,
I did a "request_irq()", the return value is a non-zero value,
indicating request failure.
I suspect it is because I put the wrong irq number into the first
argument. The related portion of code:
//----------- code ---------------
ret = request_irq( 29, irq_handler, 0, "IRQ!",(void*)(irq_handler));
if (ret==0)
printk(KERN_ALERT "success request irq\n");
else
printk(KERN_ALERT "FAIL! request irq!\n");
//----------- code ends ---------------
I got the number 29 from the processor technical reference manual
which can be found here:
http://www.ti.com/litv/pdf/sprugn4n
Referring to Table 12-4 at page 2419, "Interrupt Mapping to the MPU
Subsystem", it says IRQ 29 is mapped to GPIO module 1; since the user
button stays in GPIO module 1, and that's how I got 29.
So my questions are:
1. What number should I put in the first argument? or which portion of
the technical reference should I refer to? I've been re-reading the
"Interrupt Controller" and "General-Purpose Interface" a few times,
but it doesn't seem to help...
2. Is there any examples out there for using interrupt on beagleboard-
xM?
I read the LDD3, and The Linux Kernel Module Programming Guide, I
understand the main flow of requesting interrupt, handling interrupt,
and scheduling the bottom halves, but they don't teach about how to
find the irq number...
Thanks for any help!