Commit d6c49a7a authored by Haavard Skinnemoen's avatar Haavard Skinnemoen

[AVR32] extint: Set initial irq type to low level

David Brownell pointed out a mismatch in the avr32 extint code:

> I noticed a small glitch that's not fixed by this patch:  the
> initial type is falling edge, but IRQ_TYPE_NONE is mapped to
> IRQ_TYPE_LEVEL_LOW.  Potentially surprising.

Fix it by setting the initial type (and handler) to low level,
matching the meaning of IRQ_TYPE_NONE.
Signed-off-by: default avatarHaavard Skinnemoen <hskinnemoen@atmel.com>
parent e4f586f2
...@@ -226,15 +226,15 @@ static int __init eic_probe(struct platform_device *pdev) ...@@ -226,15 +226,15 @@ static int __init eic_probe(struct platform_device *pdev)
pattern = eic_readl(eic, MODE); pattern = eic_readl(eic, MODE);
nr_irqs = fls(pattern); nr_irqs = fls(pattern);
/* Trigger on falling edge unless overridden by driver */ /* Trigger on low level unless overridden by driver */
eic_writel(eic, MODE, 0UL);
eic_writel(eic, EDGE, 0UL); eic_writel(eic, EDGE, 0UL);
eic_writel(eic, LEVEL, 0UL);
eic->chip = &eic_chip; eic->chip = &eic_chip;
for (i = 0; i < nr_irqs; i++) { for (i = 0; i < nr_irqs; i++) {
set_irq_chip_and_handler(eic->first_irq + i, &eic_chip, set_irq_chip_and_handler(eic->first_irq + i, &eic_chip,
handle_edge_irq); handle_level_irq);
set_irq_chip_data(eic->first_irq + i, eic); set_irq_chip_data(eic->first_irq + i, eic);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment