[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240711193749.2397471-2-tmaimon77@gmail.com>
Date: Thu, 11 Jul 2024 22:37:43 +0300
From: Tomer Maimon <tmaimon77@...il.com>
To: <linus.walleij@...aro.org>, <avifishman70@...il.com>,
<tali.perry1@...il.com>, <joel@....id.au>, <venture@...gle.com>,
<yuenn@...gle.com>, <benjaminfair@...gle.com>
CC: <openbmc@...ts.ozlabs.org>, <linux-kernel@...r.kernel.org>,
<linux-gpio@...r.kernel.org>, Tomer Maimon <tmaimon77@...il.com>
Subject: [PATCH v1 1/7] pinctrl: nuvoton: npcm8xx: clear polarity before set both edge
Clear polarity before setting both edges to ensure that the polarity is
in the same state before configuring events for both edges
Signed-off-by: Tomer Maimon <tmaimon77@...il.com>
---
drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c b/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c
index a377d36b0eb0..0cd8a5e00cde 100644
--- a/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c
+++ b/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c
@@ -241,6 +241,7 @@ static int npcmgpio_set_irq_type(struct irq_data *d, unsigned int type)
npcm_gpio_set(&bank->gc, bank->base + NPCM8XX_GP_N_POL, gpio);
break;
case IRQ_TYPE_EDGE_BOTH:
+ npcm_gpio_clr(&bank->gc, bank->base + NPCM8XX_GP_N_POL, gpio);
npcm_gpio_set(&bank->gc, bank->base + NPCM8XX_GP_N_EVBE, gpio);
break;
case IRQ_TYPE_LEVEL_LOW:
--
2.34.1
Powered by blists - more mailing lists