linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: gpio irqs broken on imx27 with dt
Date: Fri, 27 Apr 2012 23:50:45 +0200	[thread overview]
Message-ID: <20120427215045.GC20478@pengutronix.de> (raw)
In-Reply-To: <20120427125048.GN20039@pengutronix.de>

On Fri, Apr 27, 2012 at 02:50:48PM +0200, Uwe Kleine-K?nig wrote:
> Hello,
> 
> I experience problems on using gpio irqs on an imx27 based machine
> booting with dt.
> 
> I think one problem is:
> 
>         if (mxc_gpio_hwtype == IMX21_GPIO) {
>                 /* setup one handler for all GPIO interrupts */
>                 if (pdev->id == 0)
>                         irq_set_chained_handler(port->irq,
>                                                 mx2_gpio_irq_handler);
> 	} ...
> 
> because the inner if doesn't trigger as dt-created gpio devices have all
> pdev->id == -1.

How about

	static int once = 0;

	if (mxc_gpio_hwtype == IMX21_GPIO) {
		/* setup one handler for all GPIO interrupts */
		if (!once) {
			irq_set_chained_handler(port->irq,
						mx2_gpio_irq_handler);
			once = 1;
		}

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  parent reply	other threads:[~2012-04-27 21:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-27 12:50 gpio irqs broken on imx27 with dt Uwe Kleine-König
2012-04-27 13:18 ` Dong Aisheng
2012-04-27 21:16 ` Fabio Estevam
2012-04-27 21:50 ` Sascha Hauer [this message]
2012-04-28 10:31   ` Uwe Kleine-König

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=20120427215045.GC20478@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).