<br><br><div class="gmail_quote">On Mon, Aug 15, 2011 at 7:03 PM, radhika bhaskaran <span dir="ltr"><<a href="mailto:radhibhas@gmail.com">radhibhas@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
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></blockquote><div> </div><div>IRQ_SHARED flag could work if IRQ_ONESHOT isn't enabled.</div>
<div><br></div><div>In your request_threaded_irq(), you assigned thread_func() and NULL for handler_func(). It means that IRQ_ONESHOT is enabled. You either registered it to handler_func(), or abandon irq handler sharing between multiple drivers.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div></div><div><br></div><div><div class="h5"><div><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" target="_blank">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>On Sat, Aug 13, 2011 at 9:25 PM, radhika bhaskaran <<a href="mailto:radhibhas@gmail.com" target="_blank">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> 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>
</div></div><br>_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
<br></blockquote></div><br>