Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Baolin Wang and committed by
Linus Walleij
102bbe34 79a3aaa7

+1
+1
drivers/gpio/gpio-eic-sprd.c
··· 414 414 irq_set_handler_locked(data, handle_edge_irq); 415 415 break; 416 416 case IRQ_TYPE_EDGE_BOTH: 417 + sprd_eic_update(chip, offset, SPRD_EIC_SYNC_INTMODE, 0); 417 418 sprd_eic_update(chip, offset, SPRD_EIC_SYNC_INTBOTH, 1); 418 419 irq_set_handler_locked(data, handle_edge_irq); 419 420 break;