Skip to content

Commit

Permalink
ARM: LPC32xx: Use handle_edge_irq() callback on edge type irqs
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Roland Stigge committed Sep 6, 2012
1 parent 4cbe5a5 commit 4607d65
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions arch/arm/mach-lpc32xx/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,31 +283,32 @@ static int lpc32xx_set_irq_type(struct irq_data *d, unsigned int type)
case IRQ_TYPE_EDGE_RISING:
/* Rising edge sensitive */
__lpc32xx_set_irq_type(d->hwirq, 1, 1);
__irq_set_handler_locked(d->hwirq, handle_edge_irq);
break;

case IRQ_TYPE_EDGE_FALLING:
/* Falling edge sensitive */
__lpc32xx_set_irq_type(d->hwirq, 0, 1);
__irq_set_handler_locked(d->hwirq, handle_edge_irq);
break;

case IRQ_TYPE_LEVEL_LOW:
/* Low level sensitive */
__lpc32xx_set_irq_type(d->hwirq, 0, 0);
__irq_set_handler_locked(d->hwirq, handle_level_irq);
break;

case IRQ_TYPE_LEVEL_HIGH:
/* High level sensitive */
__lpc32xx_set_irq_type(d->hwirq, 1, 0);
__irq_set_handler_locked(d->hwirq, handle_level_irq);
break;

/* Other modes are not supported */
default:
return -EINVAL;
}

/* Ok to use the level handler for all types */
irq_set_handler(d->hwirq, handle_level_irq);

return 0;
}

Expand Down

0 comments on commit 4607d65

Please sign in to comment.