ARM: LPC32xx: Use handle_edge_irq() callback on edge type irqs

irq.c uses handle_level_irq() as the unconditional default handler. This patch
uses handle_edge_irq() instead for edge type irqs.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Acked-by: Srinivas Bakki <srinivas.bakki@nxp.com>
This commit is contained in:
Roland Stigge
2012-09-06 11:39:10 +02:00
parent 4cbe5a555f
commit 4607d65ab3

View File

@@ -283,21 +283,25 @@ static int lpc32xx_set_irq_type(struct irq_data *d, unsigned int type)
case IRQ_TYPE_EDGE_RISING: case IRQ_TYPE_EDGE_RISING:
/* Rising edge sensitive */ /* Rising edge sensitive */
__lpc32xx_set_irq_type(d->hwirq, 1, 1); __lpc32xx_set_irq_type(d->hwirq, 1, 1);
__irq_set_handler_locked(d->hwirq, handle_edge_irq);
break; break;
case IRQ_TYPE_EDGE_FALLING: case IRQ_TYPE_EDGE_FALLING:
/* Falling edge sensitive */ /* Falling edge sensitive */
__lpc32xx_set_irq_type(d->hwirq, 0, 1); __lpc32xx_set_irq_type(d->hwirq, 0, 1);
__irq_set_handler_locked(d->hwirq, handle_edge_irq);
break; break;
case IRQ_TYPE_LEVEL_LOW: case IRQ_TYPE_LEVEL_LOW:
/* Low level sensitive */ /* Low level sensitive */
__lpc32xx_set_irq_type(d->hwirq, 0, 0); __lpc32xx_set_irq_type(d->hwirq, 0, 0);
__irq_set_handler_locked(d->hwirq, handle_level_irq);
break; break;
case IRQ_TYPE_LEVEL_HIGH: case IRQ_TYPE_LEVEL_HIGH:
/* High level sensitive */ /* High level sensitive */
__lpc32xx_set_irq_type(d->hwirq, 1, 0); __lpc32xx_set_irq_type(d->hwirq, 1, 0);
__irq_set_handler_locked(d->hwirq, handle_level_irq);
break; break;
/* Other modes are not supported */ /* Other modes are not supported */
@@ -305,9 +309,6 @@ static int lpc32xx_set_irq_type(struct irq_data *d, unsigned int type)
return -EINVAL; return -EINVAL;
} }
/* Ok to use the level handler for all types */
irq_set_handler(d->hwirq, handle_level_irq);
return 0; return 0;
} }