All of lore.kernel.org
 help / color / mirror / Atom feed
* Interrupt handler registration for multiple devices
@ 2006-08-30 15:12 ` Rick Brown
  0 siblings, 0 replies; 5+ messages in thread
From: Rick Brown @ 2006-08-30 15:12 UTC (permalink / raw)
  To: linux-newbie, kernelnewbies, linux-kernel

Hi,

I want to write a driver that will handle multiple devices. These
devices will share the IRQ line. Do I need to register my (same)
interrupt handler as many times as the number of devices(by calling
request_irq())?

Also an unrelated query. Can I sleep after a call to preempt_kernel()??

TIA,

Rick

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Interrupt handler registration for multiple devices
@ 2006-08-30 15:12 ` Rick Brown
  0 siblings, 0 replies; 5+ messages in thread
From: Rick Brown @ 2006-08-30 15:12 UTC (permalink / raw)
  To: linux-newbie, kernelnewbies, linux-kernel

Hi,

I want to write a driver that will handle multiple devices. These
devices will share the IRQ line. Do I need to register my (same)
interrupt handler as many times as the number of devices(by calling
request_irq())?

Also an unrelated query. Can I sleep after a call to preempt_kernel()??

TIA,

Rick
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Interrupt handler registration for multiple devices
  2006-08-30 15:12 ` Rick Brown
  (?)
@ 2006-08-30 15:29 ` Octavian Purdila
  -1 siblings, 0 replies; 5+ messages in thread
From: Octavian Purdila @ 2006-08-30 15:29 UTC (permalink / raw)
  To: kernelnewbies; +Cc: Rick Brown, linux-newbie

On Wednesday 30 August 2006 18:12, Rick Brown wrote:
> Hi,
>
> I want to write a driver that will handle multiple devices. These
> devices will share the IRQ line. Do I need to register my (same)
> interrupt handler as many times as the number of devices(by calling
> request_irq())?
>

No, once will suffice. However, you will need to check your devices registers 
and figure out which device triggered the interrupt.

tavi
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Interrupt handler registration for multiple devices
  2006-08-30 15:12 ` Rick Brown
@ 2006-08-30 19:38   ` Alan Cox
  -1 siblings, 0 replies; 5+ messages in thread
From: Alan Cox @ 2006-08-30 19:38 UTC (permalink / raw)
  To: Rick Brown; +Cc: linux-newbie, kernelnewbies, linux-kernel

Ar Mer, 2006-08-30 am 20:42 +0530, ysgrifennodd Rick Brown:
> Hi,
> 
> I want to write a driver that will handle multiple devices. These
> devices will share the IRQ line. Do I need to register my (same)
> interrupt handler as many times as the number of devices(by calling
> request_irq())?

Up to you. If you are working with standard devices that need no special
handling to share interrupts (eg PCI bus), the device model makes it
more natural to do that and let the kernel call your handler once for
each device (passing a different dev_id).



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Interrupt handler registration for multiple devices
@ 2006-08-30 19:38   ` Alan Cox
  0 siblings, 0 replies; 5+ messages in thread
From: Alan Cox @ 2006-08-30 19:38 UTC (permalink / raw)
  To: Rick Brown; +Cc: linux-newbie, kernelnewbies, linux-kernel

Ar Mer, 2006-08-30 am 20:42 +0530, ysgrifennodd Rick Brown:
> Hi,
> 
> I want to write a driver that will handle multiple devices. These
> devices will share the IRQ line. Do I need to register my (same)
> interrupt handler as many times as the number of devices(by calling
> request_irq())?

Up to you. If you are working with standard devices that need no special
handling to share interrupts (eg PCI bus), the device model makes it
more natural to do that and let the kernel call your handler once for
each device (passing a different dev_id).


-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-08-30 19:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-30 15:12 Interrupt handler registration for multiple devices Rick Brown
2006-08-30 15:12 ` Rick Brown
2006-08-30 15:29 ` Octavian Purdila
2006-08-30 19:38 ` Alan Cox
2006-08-30 19:38   ` Alan Cox

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.