diff mbox series

[v2,2/2] gpio: sprd: Fix incorrect irq type setting for the async EIC

Message ID 46524f86b327de62753be9046ef217a66d674b33.1547615070.git.baolin.wang@linaro.org
State Accepted
Commit 102bbe34b31c9159e714432afd64458f6f3876d7
Headers show
Series None | expand

Commit Message

(Exiting) Baolin Wang Jan. 16, 2019, 5:06 a.m. UTC
From: Neo Hou <neo.hou@unisoc.com>


When setting async EIC as IRQ_TYPE_EDGE_BOTH type, we missed to set the
SPRD_EIC_ASYNC_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@vger.kernel.org>
Signed-off-by: Neo Hou <neo.hou@unisoc.com>

Signed-off-by: Baolin Wang <baolin.wang@linaro.org>

---
Changes from v1:
 - Add fix tag and CC stable.
---
 drivers/gpio/gpio-eic-sprd.c |    1 +
 1 file changed, 1 insertion(+)

-- 
1.7.9.5
diff mbox series

Patch

diff --git a/drivers/gpio/gpio-eic-sprd.c b/drivers/gpio/gpio-eic-sprd.c
index 257df59..e41223c 100644
--- a/drivers/gpio/gpio-eic-sprd.c
+++ b/drivers/gpio/gpio-eic-sprd.c
@@ -379,6 +379,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_ASYNC_INTMODE, 0);
 			sprd_eic_update(chip, offset, SPRD_EIC_ASYNC_INTBOTH, 1);
 			irq_set_handler_locked(data, handle_edge_irq);
 			break;