linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kun Yi <kunyi@google.com>
To: linus.walleij@linaro.org, linux-gpio@vger.kernel.org,
	tmaimon77@gmail.com
Cc: linux-kernel@vger.kernel.org, avifishman70@gmail.com,
	openbmc@lists.ozlabs.org, Kun Yi <kunyi@google.com>
Subject: [PATCH 2/2] pinctrl: pinctrl-npcm7xx: Set BGPIOF_VOLATILE_REG
Date: Wed, 17 Oct 2018 14:30:12 -0700	[thread overview]
Message-ID: <20181017213012.233957-3-kunyi@google.com> (raw)
In-Reply-To: <20181017213012.233957-1-kunyi@google.com>

Indicate that the pins are both controlled by the pinctrl driver and the
generic GPIO driver, thus GPIO driver should read the register value
before updating, instead of using the stored shadow register values.

Signed-off-by: Kun Yi <kunyi@google.com>
---
 drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
index 7ad50d9268aa..ac7b69d53aff 100644
--- a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
+++ b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
@@ -1904,7 +1904,8 @@ static int npcm7xx_gpio_of(struct npcm7xx_pinctrl *pctrl)
 					 NULL,
 					 pctrl->gpio_bank[id].base +
 					 NPCM7XX_GP_N_IEM,
-					 BGPIOF_READ_OUTPUT_REG_SET);
+					 BGPIOF_READ_OUTPUT_REG_SET |
+					 BGPIOF_VOLATILE_REG);
 			if (ret) {
 				dev_err(pctrl->dev, "bgpio_init() failed\n");
 				return ret;
-- 
2.19.1.331.ge82ca0e54c-goog


  parent reply	other threads:[~2018-10-17 21:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-17 21:30 [PATCH 0/2] Allow gpio-mmio to co-exist with pinctrl driver Kun Yi
2018-10-17 21:30 ` [PATCH 1/2] gpio: gpio-mmio: Allow volatile shadow regs Kun Yi
2018-10-18 11:49   ` kbuild test robot
2018-10-30 12:06   ` Linus Walleij
2018-10-17 21:30 ` Kun Yi [this message]
2018-10-30 12:08   ` [PATCH 2/2] pinctrl: pinctrl-npcm7xx: Set BGPIOF_VOLATILE_REG Linus Walleij
2018-10-31  5:06     ` Kun Yi

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=20181017213012.233957-3-kunyi@google.com \
    --to=kunyi@google.com \
    --cc=avifishman70@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=openbmc@lists.ozlabs.org \
    --cc=tmaimon77@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).