Hi javier,<div><br></div><div>Thanks for the help.</div><div><br></div><div>I have tried the suggestion made by you. But unfortunately it did not work.</div><div><br></div><div>For my debugging purpose i tried to register two isr's on the same number IRQ no in the same driver. But the isr which is registerd first is being hit.</div>
<div><br></div><div>The other isr funciton which is registered after the first isr is never executed.</div><div><br></div><div>Any more suggestions?</div><div><br></div><div>Regards,</div><div>RB</div><div><br><br><div class="gmail_quote">
On Sun, Aug 14, 2011 at 6:31 AM, Javier Martinez Canillas <span dir="ltr"><<a href="mailto:martinez.javier@gmail.com">martinez.javier@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5">On Sat, Aug 13, 2011 at 9:25 PM, radhika bhaskaran <<a href="mailto:radhibhas@gmail.com">radhibhas@gmail.com</a>> wrote:<br>
> Hi,<br>
> I have a question with respect to request_threaded_irq.<br>
> Assume that one driver has registered and ISR on some particular irq number.<br>
> Can i use the same irq number and register and isr in another driver.<br>
> Because that is my requirement.<br>
> when i try to do that is an error message with an error no as -19.<br>
> err = request_threaded_irq(pdata->irq , NULL, testing_fucntion,<br>
> IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,<br>
> "testing_function", dev);<br>
> Can some one please help me whether it is possible.<br>
> Regards,<br>
> RB<br>
<br>
</div></div>You have to use the IRQF_SHARED flag that specifies the IRQ will be<br>
shared for two devices:<br>
<br>
err = request_threaded_irq(pdata->irq , NULL, testing_fucntion, IRQF_SHARED |<br>
<div class="im"> IRQF_TRIGGER_FALLING |<br>
IRQF_TRIGGER_RISING,<br>
"testing_function", dev);<br>
<br>
</div>Have in mind that the kernel invokes every handler registered for that<br>
IRQ every time an interrupt occurs on that line. So you have to check<br>
in each ISR if the hardware raised the interrupt.<br>
<br>
Hope it helps,<br>
<font color="#888888"><br>
--<br>
Javier Martínez Canillas<br>
(+34) 682 39 81 69<br>
Barcelona, Spain<br>
</font></blockquote></div><br></div>