From: Chuanhong Guo <gch981213@gmail.com>
To: linux-gpio@vger.kernel.org
Cc: "Chuanhong Guo" <gch981213@gmail.com>,
"Linus Walleij" <linus.walleij@linaro.org>,
"Bartosz Golaszewski" <bgolaszewski@baylibre.com>,
"Sergio Paracuellos" <sergio.paracuellos@gmail.com>,
"René van Dorst" <opensource@vdorst.com>,
linux-kernel@vger.kernel.org (open list)
Subject: [PATCH 2/2] gpio: mt7621: add BGPIOF_NO_SET_ON_INPUT flag
Date: Sun, 15 Mar 2020 20:13:38 +0800 [thread overview]
Message-ID: <20200315121338.251362-3-gch981213@gmail.com> (raw)
In-Reply-To: <20200315121338.251362-1-gch981213@gmail.com>
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>
---
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
next prev parent reply other threads:[~2020-03-15 12:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-15 12:13 [PATCH 0/2] gpio: mmio: introduce BGPIOF_NO_SET_ON_INPUT Chuanhong Guo
2020-03-15 12:13 ` [PATCH 1/2] " Chuanhong Guo
2020-03-16 9:27 ` Bartosz Golaszewski
2020-03-15 12:13 ` Chuanhong Guo [this message]
2020-03-16 9:27 ` [PATCH 2/2] gpio: mt7621: add BGPIOF_NO_SET_ON_INPUT flag Bartosz Golaszewski
2020-03-15 12:48 ` [PATCH 0/2] gpio: mmio: introduce BGPIOF_NO_SET_ON_INPUT René van Dorst
2020-03-15 14:17 ` Sergio Paracuellos
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200315121338.251362-3-gch981213@gmail.com \
--to=gch981213@gmail.com \
--cc=bgolaszewski@baylibre.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=opensource@vdorst.com \
--cc=sergio.paracuellos@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).