public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: Felipe Balbi <me@felipebalbi.com>
Cc: linux-omap@vger.kernel.org, Tony Lindgren <tony@atomide.com>,
	Felipe Balbi <felipe.balbi@nokia.com>
Subject: Re: [PATCH 20/23] twl4030-gpio: irq and other cleanup
Date: Mon, 29 Sep 2008 17:06:08 -0700	[thread overview]
Message-ID: <200809291706.09549.david-b@pacbell.net> (raw)
In-Reply-To: <1222707783-18936-21-git-send-email-me@felipebalbi.com>

On Monday 29 September 2008, Felipe Balbi wrote:
> From: David Brownell <dbrownell@users.sourceforge.net>
> 
> 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 */


  parent reply	other threads:[~2008-09-30  0:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1222707783-18936-1-git-send-email-me@felipebalbi.com>
     [not found] ` <1222707783-18936-12-git-send-email-me@felipebalbi.com>
     [not found]   ` <1222707783-18936-13-git-send-email-me@felipebalbi.com>
2008-09-29 20:06     ` [PATCH 12/23] move twl4030-gpio to drivers/gpio David Brownell
2008-09-29 20:19       ` Felipe Balbi
2008-09-29 20:45         ` David Brownell
2008-09-29 21:01           ` Felipe Balbi
     [not found] ` <1222707783-18936-20-git-send-email-me@felipebalbi.com>
     [not found]   ` <1222707783-18936-21-git-send-email-me@felipebalbi.com>
2008-09-30  0:06     ` David Brownell [this message]
2008-09-30  0:30     ` [PATCH 20/23] twl4030-gpio: irq and other cleanup David Brownell
2008-09-30  0:39       ` Felipe Balbi
2008-09-30  2:36         ` David Brownell
     [not found]     ` <1222707783-18936-22-git-send-email-me@felipebalbi.com>
2008-09-30  0:31       ` [PATCH 21/23] twl4030-core: portability updates David Brownell
2008-09-30 10:05 [PATCH 00/23] twl4030 patches (v4) Felipe Balbi
2008-09-30 10:05 ` [PATCH 01/23] twl4030: fix potential null pointer dereference Felipe Balbi
2008-09-30 10:05   ` [PATCH 02/23] twl4030-gpio: Remove default pullup enable/disable of GPIO Felipe Balbi
2008-09-30 10:05     ` [PATCH 03/23] i2c: clean add_children a bit Felipe Balbi
2008-09-30 10:05       ` [PATCH 04/23] i2c: move twl4030_keypad to new style registration Felipe Balbi
2008-09-30 10:05         ` [PATCH 05/23] i2c: move twl4030-usb to platform_device Felipe Balbi
2008-09-30 10:05           ` [PATCH 06/23] i2c: twl4030-usb: add 'vbus' sysfs file Felipe Balbi
2008-09-30 10:05             ` [PATCH 07/23] twl4030 gpio platform data Felipe Balbi
2008-09-30 10:05               ` [PATCH 08/23] twl4030 uses gpiolib Felipe Balbi
2008-09-30 10:05                 ` [PATCH 09/23] i2c: move twl4030-madc to new registration style Felipe Balbi
2008-09-30 10:05                   ` [PATCH 10/23] minor twl4030-core cleanups Felipe Balbi
2008-09-30 10:05                     ` [PATCH 11/23] provide detailed diagnostics in add_children() Felipe Balbi
2008-09-30 10:05                       ` [PATCH 12/23] move twl4030-gpio to drivers/gpio Felipe Balbi
2008-09-30 10:05                         ` [PATCH 13/23] i2c: added a few missing gotos to add_children() Felipe Balbi
2008-09-30 10:05                           ` [PATCH 14/23] minor irq-related cleanups Felipe Balbi
2008-09-30 10:05                             ` [PATCH 15/23] i2c: switch twl4030-usb to use a resource for irq Felipe Balbi
2008-09-30 10:05                               ` [PATCH 16/23] Move I2C driver model init earlier in the boot sequence Felipe Balbi
2008-09-30 10:05                                 ` [PATCH 17/23] i2c: minor cleanups to twl4030-pwrbutton.c Felipe Balbi
2008-09-30 10:05                                   ` [PATCH 18/23] twl4030-gpio irq_chip.set_type Felipe Balbi
2008-09-30 10:05                                     ` [PATCH 19/23] twl4030-gpio: remove legacy irq triggering calls and user Felipe Balbi
2008-09-30 10:05                                       ` [PATCH 20/23] twl4030-gpio: irq and other cleanup Felipe Balbi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200809291706.09549.david-b@pacbell.net \
    --to=david-b@pacbell.net \
    --cc=felipe.balbi@nokia.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=me@felipebalbi.com \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox