gpio: mpc8xxx: Correct irq handler function
authorLiu Gang <Gang.Liu@nxp.com>
Fri, 21 Oct 2016 07:31:28 +0000 (15:31 +0800)
committerWilly Tarreau <w@1wt.eu>
Fri, 10 Feb 2017 10:04:03 +0000 (11:04 +0100)
commit d71cf15b865bdd45925f7b094d169aaabd705145 upstream.

From the beginning of the gpio-mpc8xxx.c, the "handle_level_irq"
has being used to handle GPIO interrupts in the PowerPC/Layerscape
platforms. But actually, almost all PowerPC/Layerscape platforms
assert an interrupt request upon either a high-to-low change or
any change on the state of the signal.

So the "handle_level_irq" is not reasonable for PowerPC/Layerscape
GPIO interrupt, it should be "handle_edge_irq". Otherwise the system
may lost some interrupts from the PIN's state changes.

Signed-off-by: Liu Gang <Gang.Liu@nxp.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
drivers/gpio/gpio-mpc8xxx.c

index 2aa3ca215bd614743b3c323d02e0560974958954..d5376aa1c5e1d3048a3fe1978e834bdf0cf13c2e 100644 (file)
@@ -295,7 +295,7 @@ static int mpc8xxx_gpio_irq_map(struct irq_domain *h, unsigned int virq,
                mpc8xxx_irq_chip.irq_set_type = mpc8xxx_gc->of_dev_id_data;
 
        irq_set_chip_data(virq, h->host_data);
-       irq_set_chip_and_handler(virq, &mpc8xxx_irq_chip, handle_level_irq);
+       irq_set_chip_and_handler(virq, &mpc8xxx_irq_chip, handle_edge_irq);
 
        return 0;
 }