]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
gpio: mxc: fix irq_high handling
authorAlexander Stein <alexander.stein@ew.tq-group.com>
Tue, 26 May 2026 06:35:01 +0000 (08:35 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Tue, 26 May 2026 08:04:47 +0000 (10:04 +0200)
If port->irq_high is -1 (fsl,imx21-gpio compatible) and gpio_idx is >= 16
enable_irq_wake() is called with -1 which is wrong.

Fixes: 5f6d1998adeb ("gpio: mxc: release the parent IRQ in runtime suspend")
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260526063504.25916-1-alexander.stein@ew.tq-group.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
drivers/gpio/gpio-mxc.c

index 647b6f4861b74416abc564430c57c672f813f6bd..12f11a6c96653cde22f16df0ca9ed9bdf8e7b290 100644 (file)
@@ -469,7 +469,7 @@ static int mxc_gpio_probe(struct platform_device *pdev)
                 * the handler is needed only once, but doing it for every port
                 * is more robust and easier.
                 */
-               port->irq_high = -1;
+               port->irq_high = 0;
                port->mx_irq_handler = mx2_gpio_irq_handler;
        } else
                port->mx_irq_handler = mx3_gpio_irq_handler;