* [PATCH] pinctrl: npcm7xx: prevent glitch when setting the GPIO to output high
@ 2023-11-15 21:12 William A. Kennington III
2023-11-24 9:42 ` Linus Walleij
0 siblings, 1 reply; 2+ messages in thread
From: William A. Kennington III @ 2023-11-15 21:12 UTC (permalink / raw)
To: tmaimon77, tali.perry1, avifishman70, linus.walleij, joel
Cc: linux-gpio, linux-kernel, William A . Kennington III
From: Tomer Maimon <tmaimon77@gmail.com>
Enable GPIO output after setting the output value to prevent a glitch
when pinctrl driver sets gpio pin to output high and the pin is in
the default state (high->low->high).
Signed-off-by: Tomer Maimon <tmaimon77@gmail.com>
Signed-off-by: William A. Kennington III <william@wkennington.com>
---
drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
index 1e658721aaba..62a46d824b46 100644
--- a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
+++ b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
@@ -1790,8 +1790,8 @@ static int npcm7xx_config_set_one(struct npcm7xx_pinctrl *npcm,
bank->direction_input(&bank->gc, pin % bank->gc.ngpio);
break;
case PIN_CONFIG_OUTPUT:
- iowrite32(gpio, bank->base + NPCM7XX_GP_N_OES);
bank->direction_output(&bank->gc, pin % bank->gc.ngpio, arg);
+ iowrite32(gpio, bank->base + NPCM7XX_GP_N_OES);
break;
case PIN_CONFIG_DRIVE_PUSH_PULL:
npcm_gpio_clr(&bank->gc, bank->base + NPCM7XX_GP_N_OTYP, gpio);
--
2.43.0.rc0.421.g78406f8d94-goog
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] pinctrl: npcm7xx: prevent glitch when setting the GPIO to output high
2023-11-15 21:12 [PATCH] pinctrl: npcm7xx: prevent glitch when setting the GPIO to output high William A. Kennington III
@ 2023-11-24 9:42 ` Linus Walleij
0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2023-11-24 9:42 UTC (permalink / raw)
To: William A. Kennington III
Cc: tmaimon77, tali.perry1, avifishman70, joel, linux-gpio, linux-kernel
On Wed, Nov 15, 2023 at 10:12 PM William A. Kennington III
<william@wkennington.com> wrote:
> From: Tomer Maimon <tmaimon77@gmail.com>
>
> Enable GPIO output after setting the output value to prevent a glitch
> when pinctrl driver sets gpio pin to output high and the pin is in
> the default state (high->low->high).
>
> Signed-off-by: Tomer Maimon <tmaimon77@gmail.com>
> Signed-off-by: William A. Kennington III <william@wkennington.com>
Patch applied!
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-11-24 9:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-15 21:12 [PATCH] pinctrl: npcm7xx: prevent glitch when setting the GPIO to output high William A. Kennington III
2023-11-24 9:42 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®