]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[AVR32] extint: Set initial irq type to low level
authorHaavard Skinnemoen <hskinnemoen@atmel.com>
Thu, 24 Jan 2008 15:56:53 +0000 (16:56 +0100)
committerHaavard Skinnemoen <hskinnemoen@atmel.com>
Fri, 25 Jan 2008 07:31:44 +0000 (08:31 +0100)
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: Haavard Skinnemoen <hskinnemoen@atmel.com>
arch/avr32/mach-at32ap/extint.c

index 81a4a02f5f4249fc488e6688dfe320bf21e94b5a..c36a6d59d6f0785e900a7e905189e577bd4693bc 100644 (file)
@@ -226,15 +226,15 @@ static int __init eic_probe(struct platform_device *pdev)
        pattern = eic_readl(eic, MODE);
        nr_irqs = fls(pattern);
 
-       /* Trigger on falling edge unless overridden by driver */
-       eic_writel(eic, MODE, 0UL);
+       /* Trigger on low level unless overridden by driver */
        eic_writel(eic, EDGE, 0UL);
+       eic_writel(eic, LEVEL, 0UL);
 
        eic->chip = &eic_chip;
 
        for (i = 0; i < nr_irqs; i++) {
                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);
        }