aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2012-06-06 05:49:23 -0400
committerLinus Walleij <linus.walleij@linaro.org>2012-07-05 09:40:35 -0400
commit33a4e985bab25d6753b52d1322b4e2fff706dd4f (patch)
treec240b8622c3d34ee02eacfae7065fe82132513eb /drivers/gpio
parentf567fde24640cf6f2d6416196bfc8b3fefc8e433 (diff)
gpio/mxc: make irqs work for fsl,imx21-gpio devices
The chained handler was set for the platform device with id == 0. When the gpio devices are instantiated by a device tree, all have id == -1 and so the handler was unset resulting in unusable gpio irqs on i.MX21 and i.MX27 (when using oftree). Acked-by: Shawn Guo <shawn.guo@linaro.org> Cc: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpio-mxc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gpio/gpio-mxc.c b/drivers/gpio/gpio-mxc.c
index c337143b18f8..c89c4c1e668d 100644
--- a/drivers/gpio/gpio-mxc.c
+++ b/drivers/gpio/gpio-mxc.c
@@ -398,10 +398,12 @@ static int __devinit mxc_gpio_probe(struct platform_device *pdev)
398 writel(~0, port->base + GPIO_ISR); 398 writel(~0, port->base + GPIO_ISR);
399 399
400 if (mxc_gpio_hwtype == IMX21_GPIO) { 400 if (mxc_gpio_hwtype == IMX21_GPIO) {
401 /* setup one handler for all GPIO interrupts */ 401 /*
402 if (pdev->id == 0) 402 * Setup one handler for all GPIO interrupts. Actually setting
403 irq_set_chained_handler(port->irq, 403 * the handler is needed only once, but doing it for every port
404 mx2_gpio_irq_handler); 404 * is more robust and easier.
405 */
406 irq_set_chained_handler(port->irq, mx2_gpio_irq_handler);
405 } else { 407 } else {
406 /* setup one handler for each entry */ 408 /* setup one handler for each entry */
407 irq_set_chained_handler(port->irq, mx3_gpio_irq_handler); 409 irq_set_chained_handler(port->irq, mx3_gpio_irq_handler);