[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <e7ca1df3b3159d6e1c65c6a2a9f01a7ecabcc821.1554882235.git.baolin.wang@linaro.org>
Date: Wed, 10 Apr 2019 15:47:54 +0800
From: Baolin Wang <baolin.wang@...aro.org>
To: linus.walleij@...aro.org, bgolaszewski@...libre.com
Cc: orsonzhai@...il.com, zhang.lyra@...il.com, baolin.wang@...aro.org,
broonie@...nel.org, linux-gpio@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] gpio: eic: sprd: Fix incorrect irq type setting for the sync EIC
When setting sync EIC as IRQ_TYPE_EDGE_BOTH type, we missed to set the
SPRD_EIC_SYNC_INTMODE register to 0, which means detecting edge signals.
Thus this patch fixes the issue.
Fixes: 25518e024e3a ("gpio: Add Spreadtrum EIC driver support")
Cc: <stable@...r.kernel.org>
Signed-off-by: Baolin Wang <baolin.wang@...aro.org>
---
drivers/gpio/gpio-eic-sprd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpio/gpio-eic-sprd.c b/drivers/gpio/gpio-eic-sprd.c
index f0223ce..7709226 100644
--- a/drivers/gpio/gpio-eic-sprd.c
+++ b/drivers/gpio/gpio-eic-sprd.c
@@ -414,6 +414,7 @@ static int sprd_eic_irq_set_type(struct irq_data *data, unsigned int flow_type)
irq_set_handler_locked(data, handle_edge_irq);
break;
case IRQ_TYPE_EDGE_BOTH:
+ sprd_eic_update(chip, offset, SPRD_EIC_SYNC_INTMODE, 0);
sprd_eic_update(chip, offset, SPRD_EIC_SYNC_INTBOTH, 1);
irq_set_handler_locked(data, handle_edge_irq);
break;
--
1.7.9.5
Powered by blists - more mailing lists