blob: 8a1daee02191374b08eaeea8f3dc105a11783491 [file] [log] [blame]
From f57e8825be7e649c070f51e76102f07ff3d9053d Mon Sep 17 00:00:00 2001
From: Andy Shevchenko <>
Date: Mon, 18 Nov 2019 20:02:51 +0200
Subject: [PATCH] gpio: lynxpoint: Setup correct IRQ handlers
commit e272f7ec070d212b9301d5a465bc8952f8dcf908 upstream.
When commit 75e99bf5ed8f ("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: 75e99bf5ed8f ("gpio: lynxpoint: set default handler to be handle_bad_irq()")
Signed-off-by: Andy Shevchenko <>
Signed-off-by: Linus Walleij <>
Signed-off-by: Paul Gortmaker <>
diff --git a/drivers/gpio/gpio-lynxpoint.c b/drivers/gpio/gpio-lynxpoint.c
index 31b4a091ab60..691bff63e7dd 100644
--- a/drivers/gpio/gpio-lynxpoint.c
+++ b/drivers/gpio/gpio-lynxpoint.c
@@ -164,6 +164,12 @@ static int lp_irq_type(struct irq_data *d, unsigned type)
outl(value, reg);
+ if (type & IRQ_TYPE_EDGE_BOTH)
+ irq_set_handler_locked(d, handle_edge_irq);
+ else if (type & IRQ_TYPE_LEVEL_MASK)
+ irq_set_handler_locked(d, handle_level_irq);
spin_unlock_irqrestore(&lg->lock, flags);
return 0;