Re: Fwd: [RFC] IRQ type flags

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

 



On Sun, Nov 06, 2005 at 10:59:58PM +0000, Alan Cox wrote:
> On Sul, 2005-11-06 at 22:16 +0000, Russell King wrote:
> > > This is actually true of some x86 hardware in the EISA space where there
> > > is a control register for level v edge that we sort of half deal with.
> > 
> > Thanks Alan.  Can I assume you're happy with the patch, even if x86
> > currently ignores the flags?
> 
> I'm certainly happy with it. Both the APIC and EISA IRQ control
> registers could even be made to honour it if anyone ever needed to.
> 
> Should platforms that don't support the flags be patched to error
> requests they don't support however ?

Good question - I'm not sure currently.  In the places where set_irq_type
is used on ARM, we're mainly interested in setting the input according
to rising/falling edge or high/low levels rather than switching between
edge and level mode.

We could do as you suggest, but my concern would be adding extra
complexity to drivers, causing them to do something like:

	ret = request_irq(..., SA_TRIGGER_HIGH, ...);
	if (ret == -E<whatever>)
		ret = request_irq(..., SA_TRIGGER_RISING, ...);

The alternative is:

	ret = request_irq(..., SA_TRIGGER_HIGH | SA_TRIGGER_RISING, ...);

at which point the driver is telling the IRQ layer what it can support,
and allowing the IRQ layer to select the most appropriate type given
the driver and hardware constraints.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux