Results 1 to 3 of 3
Hello:
Can we register two different interrupt service routines (for different driver code) with one interrupt line?
Is this supported by linux, and how would it be done? What if ...
- 04-03-2008 #1Just Joined!
- Join Date
- Oct 2006
- Posts
- 22
Two ISRs for one Interrupt
Hello:
Can we register two different interrupt service routines (for different driver code) with one interrupt line?
Is this supported by linux, and how would it be done? What if anything should I worry about.
Thanks,
B
- 04-05-2008 #2Linux Newbie
- Join Date
- Mar 2008
- Location
- Hyderabad
- Posts
- 109
Yes we can do. This is done if they share the irq line between them.
request_irq(unsigned int irq , irq_handler_t handler,
unsigned long flags , const char * name, void * device_id);
Check for the kernel version you r using. For 2.6.24 IRQF_SHARED flag is used. Both the drivers should give this flag. In older 2.6 kernels SA_SHIRQ flag was used.
The line is freed only when all the drivers sharing the irq frees them.
- 04-09-2008 #3Just Joined!
- Join Date
- Jun 2006
- Posts
- 29
thats right flag should be set to SA_SHIRQ and dev_id must be unique for these two, dont use NULL.


Reply With Quote
