How to enumerate interrupts?
Posted: Wed Dec 02, 2015 8:08 pm
By writing Linux kernel module one has possibility to handle interrupts. Usually using request_irq Linux function. However, it is necessary to know interrupt identifier. Is there any data that describe this correspondence between interrupts from different peripheral components and Linux identifiers?
GPIO has own helper function gpio_to_irq. With a simple loop
one can discover that there exist (at least at that particular raspi) 54 gpio pins and corresponding Linux interrupt identifiers are in range from 480 to 533. But how to find the rest?
GPIO has own helper function gpio_to_irq. With a simple loop
Code: Select all
unsigned u;
for (u = 0; u < 100; ++u)
{
int n = gpio_to_irq(u);
printk(KERN_INFO "gpio_to_irq(%u) = %d\n", u, n);
}