Skip to content

Commit cc9269f

Browse files
Philipp Rosenbergerlinusw
authored andcommitted
gpio: gpio-mxc: Fix: higher 16 GPIOs usable as wake source
In the function gpio_set_wake_irq(), port->irq_high is only checked for zero. As platform_get_irq() returns a value less then zero if no interrupt was found, any gpio >= 16 was handled like an irq_high interrupt was available. On iMX27 for example no high interrupt is available. This lead to the problem that only some gpios (the lower 16) were useable as wake sources. Signed-off-by: Philipp Rosenberger <p.rosenberger@linutronix.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
1 parent c23d200 commit cc9269f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/gpio/gpio-mxc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,9 @@ static int mxc_gpio_probe(struct platform_device *pdev)
424424
return PTR_ERR(port->base);
425425

426426
port->irq_high = platform_get_irq(pdev, 1);
427+
if (port->irq_high < 0)
428+
port->irq_high = 0;
429+
427430
port->irq = platform_get_irq(pdev, 0);
428431
if (port->irq < 0)
429432
return port->irq;

0 commit comments

Comments
 (0)