summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChuanhong Guo <gch981213@gmail.com>2020-03-15 13:13:38 +0100
committerBartosz Golaszewski <bgolaszewski@baylibre.com>2020-03-25 09:50:45 +0100
commit427cabede05cd93a4ad79153679f6aab21dc1bfa (patch)
treeb1cc51c4b02b42f03e85d9dbad05c1cf43b1fb92
parentgpio: mmio: introduce BGPIOF_NO_SET_ON_INPUT (diff)
downloadlinux-427cabede05cd93a4ad79153679f6aab21dc1bfa.tar.xz
linux-427cabede05cd93a4ad79153679f6aab21dc1bfa.zip
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@gmail.com> Tested-by: René van Dorst <opensource@vdorst.com> Reviewed-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
-rw-r--r--drivers/gpio/gpio-mt7621.c4
1 files 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;