Requesting shared IRQ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello there,

I'm new to the list and I'm new to kernel module developing, too.

I want to handle an Interrupt on an ARM processor... (at91).

The Interrupt is already handled by the module at91_timer (compiled into kernel). the module registers it's interrupt this way:

ret = request_irq(AT91_ID_SYS, at91_rtc_interrupt,
   IRQF_DISABLED | IRQF_SHARED,
   "at91_rtc", pdev);

Shouldn't it be possible to register a second interrupt handler for AT91_ID_SYS? Because that is a shared Interrupt... the handler has to check if it is the interrupt it has to handle, like that:

rtsr = at91_sys_read(AT91_RTC_SR) & at91_sys_read(AT91_RTC_IMR);
if (rtsr) {  /* this interrupt is shared!  Is it ours? */

why can't I reqister another handler, this is how I do it:

ret = request_irq(AT91_ID_SYS, timer_interrupt, SA_SHIRQ, AD_IRQ_DEVICE_NAME, NULL);
if( ret )
{
 printk(KERN_ERR "IRQ %d already claimed :(\n", AT91_ID_SYS);
 return ret;
}

that gives me just the message that the IRQ is already claimed.
Can somebody tell me that this is the right way to use shared IRQ's, or am I totally wrong?

Hello to the whole list and greets and thanks for reading :)

Ole




--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux