[PATCH 2/2] pinctrl: pinctrl-npcm7xx: Set BGPIOF_VOLATILE_REG

From: Kun Yi
Date: Wed Oct 17 2018 - 17:30:44 EST


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@xxxxxxxxxx>
---
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