Skip to content

Commit e272f7e

Browse files
andy-shevlinusw
authored andcommitted
gpio: lynxpoint: Setup correct IRQ handlers
When commit 75e99bf ("gpio: lynxpoint: set default handler to be handle_bad_irq()") switched default handler to be handle_bad_irq() the lp_irq_type() function remained untouched. It means that even request_irq() can't change the handler and we are not able to handle IRQs properly anymore. Fix it by setting correct handlers in the lp_irq_type() callback. Fixes: 75e99bf ("gpio: lynxpoint: set default handler to be handle_bad_irq()") Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
1 parent 20e5a16 commit e272f7e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/gpio/gpio-lynxpoint.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,12 @@ static int lp_irq_type(struct irq_data *d, unsigned type)
164164
value |= TRIG_SEL_BIT | INT_INV_BIT;
165165

166166
outl(value, reg);
167+
168+
if (type & IRQ_TYPE_EDGE_BOTH)
169+
irq_set_handler_locked(d, handle_edge_irq);
170+
else if (type & IRQ_TYPE_LEVEL_MASK)
171+
irq_set_handler_locked(d, handle_level_irq);
172+
167173
spin_unlock_irqrestore(&lg->lock, flags);
168174

169175
return 0;

0 commit comments

Comments
 (0)