mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-19 14:56:21 +00:00
pinctrl: npcm7xx: prevent glitch when setting the GPIO to output high
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> Link: https://lore.kernel.org/r/20231115211209.1683449-1-william@wkennington.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
5a002bf206
commit
a6059c8603
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user