Skip to content

Commit

Permalink
gpio: mpc8xxx: Correct irq handler function
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
  • Loading branch information
liugang-gavin authored and linusw committed Oct 24, 2016
1 parent 6d8d271 commit d71cf15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpio/gpio-mpc8xxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ static int mpc8xxx_gpio_irq_map(struct irq_domain *h, unsigned int irq,
irq_hw_number_t hwirq)
{
irq_set_chip_data(irq, h->host_data);
irq_set_chip_and_handler(irq, &mpc8xxx_irq_chip, handle_level_irq);
irq_set_chip_and_handler(irq, &mpc8xxx_irq_chip, handle_edge_irq);

return 0;
}
Expand Down

0 comments on commit d71cf15

Please sign in to comment.