[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200315121338.251362-3-gch981213@gmail.com>
Date: Sun, 15 Mar 2020 20:13:38 +0800
From: Chuanhong Guo <gch981213@...il.com>
To: linux-gpio@...r.kernel.org
Cc: Chuanhong Guo <gch981213@...il.com>,
Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <bgolaszewski@...libre.com>,
Sergio Paracuellos <sergio.paracuellos@...il.com>,
René van Dorst <opensource@...rst.com>,
linux-kernel@...r.kernel.org (open list)
Subject: [PATCH 2/2] gpio: mt7621: add BGPIOF_NO_SET_ON_INPUT flag
DSET/DCLR registers only works on output pins. Add corresponding
BGPIOF_NO_SET_ON_INPUT flag to bgpio_init call to fix direction_out
behavior.
Signed-off-by: Chuanhong Guo <gch981213@...il.com>
---
drivers/gpio/gpio-mt7621.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpio/gpio-mt7621.c b/drivers/gpio/gpio-mt7621.c
index b992321bb852..82fb20dca53a 100644
--- a/drivers/gpio/gpio-mt7621.c
+++ b/drivers/gpio/gpio-mt7621.c
@@ -227,8 +227,8 @@ mediatek_gpio_bank_probe(struct device *dev,
ctrl = mtk->base + GPIO_REG_DCLR + (rg->bank * GPIO_BANK_STRIDE);
diro = mtk->base + GPIO_REG_CTRL + (rg->bank * GPIO_BANK_STRIDE);
- ret = bgpio_init(&rg->chip, dev, 4,
- dat, set, ctrl, diro, NULL, 0);
+ ret = bgpio_init(&rg->chip, dev, 4, dat, set, ctrl, diro, NULL,
+ BGPIOF_NO_SET_ON_INPUT);
if (ret) {
dev_err(dev, "bgpio_init() failed\n");
return ret;
--
2.24.1
Powered by blists - more mailing lists