Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 33a4e985 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Linus Walleij
Browse files

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: default avatarShawn Guo <shawn.guo@linaro.org>
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent f567fde2
Loading
Loading
Loading
Loading
+6 −4
Original line number Original line Diff line number Diff line
@@ -398,10 +398,12 @@ static int __devinit mxc_gpio_probe(struct platform_device *pdev)
	writel(~0, port->base + GPIO_ISR);
	writel(~0, port->base + GPIO_ISR);


	if (mxc_gpio_hwtype == IMX21_GPIO) {
	if (mxc_gpio_hwtype == IMX21_GPIO) {
		/* setup one handler for all GPIO interrupts */
		/*
		if (pdev->id == 0)
		 * Setup one handler for all GPIO interrupts. Actually setting
			irq_set_chained_handler(port->irq,
		 * the handler is needed only once, but doing it for every port
						mx2_gpio_irq_handler);
		 * is more robust and easier.
		 */
		irq_set_chained_handler(port->irq, mx2_gpio_irq_handler);
	} else {
	} else {
		/* setup one handler for each entry */
		/* setup one handler for each entry */
		irq_set_chained_handler(port->irq, mx3_gpio_irq_handler);
		irq_set_chained_handler(port->irq, mx3_gpio_irq_handler);