linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gpio: eic: sprd: Fix incorrect irq type setting for the sync EIC
@ 2019-04-10  7:47 Baolin Wang
  2019-04-11 13:40 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: Baolin Wang @ 2019-04-10  7:47 UTC (permalink / raw)
  To: linus.walleij, bgolaszewski
  Cc: orsonzhai, zhang.lyra, baolin.wang, broonie, linux-gpio, linux-kernel

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>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] gpio: eic: sprd: Fix incorrect irq type setting for the sync EIC
  2019-04-10  7:47 [PATCH] gpio: eic: sprd: Fix incorrect irq type setting for the sync EIC Baolin Wang
@ 2019-04-11 13:40 ` Linus Walleij
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2019-04-11 13:40 UTC (permalink / raw)
  To: Baolin Wang
  Cc: Bartosz Golaszewski, Orson Zhai, Lyra Zhang, Mark Brown,
	open list:GPIO SUBSYSTEM, linux-kernel

On Wed, Apr 10, 2019 at 9:48 AM Baolin Wang <baolin.wang@linaro.org> wrote:

> 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>

Patch applied for fixes.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-04-11 13:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-10  7:47 [PATCH] gpio: eic: sprd: Fix incorrect irq type setting for the sync EIC Baolin Wang
2019-04-11 13:40 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).