Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gpio: mpc8xxx: Correct irq handler function

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>

authored by

Liu Gang and committed by
Linus Walleij
d71cf15b 6d8d271e

+1 -1
+1 -1
drivers/gpio/gpio-mpc8xxx.c
··· 239 239 irq_hw_number_t hwirq) 240 240 { 241 241 irq_set_chip_data(irq, h->host_data); 242 - irq_set_chip_and_handler(irq, &mpc8xxx_irq_chip, handle_level_irq); 242 + irq_set_chip_and_handler(irq, &mpc8xxx_irq_chip, handle_edge_irq); 243 243 244 244 return 0; 245 245 }