summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-eic-sprd.c
diff options
context:
space:
mode:
authorBaolin Wang <baolin.wang@linaro.org>2019-04-10 15:47:54 +0800
committerLinus Walleij <linus.walleij@linaro.org>2019-04-11 15:39:48 +0200
commit102bbe34b31c9159e714432afd64458f6f3876d7 (patch)
tree06afa04ccd32c4521c26a8b56af2c62ec7e28b37 /drivers/gpio/gpio-eic-sprd.c
parent79a3aaa7b82e3106be97842dedfd8429248896e6 (diff)
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@vger.kernel.org> Signed-off-by: Baolin Wang <baolin.wang@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-eic-sprd.c')
-rw-r--r--drivers/gpio/gpio-eic-sprd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-eic-sprd.c b/drivers/gpio/gpio-eic-sprd.c
index f0223cee9774..77092268ee95 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;