Re: [PATCH 20/23] twl4030-gpio: irq and other cleanup

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

 



On Monday 29 September 2008, Felipe Balbi wrote:
> From: David Brownell <dbrownell@xxxxxxxxxxxxxxxxxxxxx>
> 
> Remove some ARM and OMAP specific stuff from the twl4030 GPIO code,
> and some unused/undesirable CPP symbols.  Add minor checkpatch fixes.

This one and #0021 share a problem.  Looks like what I tested
wasn't the version I thought I'd tested ...


> @@ -847,9 +839,9 @@ static int __devinit gpio_twl4030_probe(struct platform_device *pdev)
>  		/* install an irq handler for each of the gpio interrupts */
>  		for (irq = twl4030_gpio_irq_base; irq < twl4030_gpio_irq_end;
>  				irq++) {
> -			set_irq_chip(irq, &twl4030_gpio_irq_chip);
> -			set_irq_handler(irq, do_twl4030_gpio_irq);

The problem is right here:

> -			set_irq_flags(irq, IRQF_VALID);
> +			set_irq_noprobe(irq);

What's going on is that set_irq_flags() is ARM-specific; so using it
will break builds everywhere else; it can't be used without adding
undesirable dependencies on ARM.  (Interface changes done in mainline
may well overlook such stuff.  And if this mechanism were important,
it would be needed on other platforms...)

That normal usage (just mark as "valid"):

  - Clears the IRQ_NOREQUEST flag ... the troublesome bit
  - Sets IRQ_NOPROBE ... like the standard set_irq_noprobe() call
  - Clears IRQ_NOAUTOEN ... set for some PCMCIA irqs and little else

Thing is, ARM also *sets* IRQ_NOREQUEST (and NOPROBE) for all IRQs,
very early.  And it's effectively the only architecture which uses
that flag.  (PowerPC doesn't quite count, since you won't even get
an IRQ number until it's been mapped and that flag is cleared.)

... So it looks like I'm going to have to come up with a different
portability fix, sigh.



> +			set_irq_chip_and_handler(irq, &twl4030_gpio_irq_chip,
> +					do_twl4030_gpio_irq);
>  		}
>  
>  		/* gpio module IRQ */

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux