diff options
author | Tomer Maimon <tmaimon77@gmail.com> | 2023-11-15 22:12:09 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2023-11-24 11:22:11 +0100 |
commit | a6059c8603bc90746bf0df930ff78013b4c789fe (patch) | |
tree | 399b58833b2f56bba6d041ed4972284eba8adc96 /drivers/pinctrl | |
parent | pinctrl: stm32: return errors from stm32_gpio_direction_output() (diff) | |
download | linux-a6059c8603bc90746bf0df930ff78013b4c789fe.tar.xz linux-a6059c8603bc90746bf0df930ff78013b4c789fe.zip |
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>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r-- | drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |