Hi javier,
You have to use the IRQF_SHARED flag that specifies the IRQ will beOn Sat, Aug 13, 2011 at 9:25 PM, radhika bhaskaran <radhibhas@gmail.com> wrote:
> Hi,
> I have a question with respect to request_threaded_irq.
> Assume that one driver has registered and ISR on some particular irq number.
> Can i use the same irq number and register and isr in another driver.
> Because that is my requirement.
> when i try to do that is an error message with an error no as -19.
> err = request_threaded_irq(pdata->irq , NULL, testing_fucntion,
> IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
> "testing_function", dev);
> Can some one please help me whether it is possible.
> Regards,
> RB
shared for two devices:
err = request_threaded_irq(pdata->irq , NULL, testing_fucntion, IRQF_SHARED |
IRQF_TRIGGER_FALLING |Have in mind that the kernel invokes every handler registered for that
IRQF_TRIGGER_RISING,
"testing_function", dev);
IRQ every time an interrupt occurs on that line. So you have to check
in each ISR if the hardware raised the interrupt.
Hope it helps,
--
Javier Martínez Canillas
(+34) 682 39 81 69
Barcelona, Spain