diff options
author | Tomer Maimon <tmaimon77@gmail.com> | 2024-07-16 22:40:04 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2024-08-05 10:32:34 +0300 |
commit | 92f5f86b064f1c50c33c74cb087bfbe3e53479d0 (patch) | |
tree | 5e643d963ab213ae78019323e46625abf9598870 /drivers/pinctrl/nuvoton | |
parent | 20070bdc1c74dcb8c899d940fa7e92d9f732687f (diff) | |
download | linux-92f5f86b064f1c50c33c74cb087bfbe3e53479d0.tar.xz |
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@gmail.com>
Link: https://lore.kernel.org/20240716194008.3502068-4-tmaimon77@gmail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/nuvoton')
-rw-r--r-- | drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c b/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c index 2df735947d86..7985400de12a 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: |