[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210130082128.3778939-1-michael@amarulasolutions.com>
Date: Sat, 30 Jan 2021 09:21:28 +0100
From: Michael Trimarchi <michael@...rulasolutions.com>
To: Linus Walleij <linus.walleij@...aro.org>,
Dong Aisheng <aisheng.dong@....com>
Cc: linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
Fabio Estevam <festevam@...il.com>,
Sascha Hauer <s.hauer@...gutronix.de>,
Michael Trimarchi <michael@...rulasolutions.com>,
Angelo Compagnucci <angelo@...rulasolutions.com>
Subject: [PATCH] pinctrl: Support pin that does not support configuration option
Some of the iMX25 pins have not an associated configuration register so
when they are configured the standard way through the device tree the
kernel complains with:
imx25-pinctrl 43fac000.iomuxc: Pin(MX25_PAD_EXT_ARMCLK) does not support
config function
Signed-off-by: Michael Trimarchi <michael@...rulasolutions.com>
Tested-by: Angelo Compagnucci <angelo@...rulasolutions.com>
---
drivers/pinctrl/core.c | 2 +-
drivers/pinctrl/freescale/pinctrl-imx.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
index 9fc4433fece4..7115b0b5689c 100644
--- a/drivers/pinctrl/core.c
+++ b/drivers/pinctrl/core.c
@@ -1273,7 +1273,7 @@ static int pinctrl_commit_state(struct pinctrl *p, struct pinctrl_state *state)
break;
}
- if (ret < 0) {
+ if (ret < 0 && ret != -ENOTSUPP) {
goto unapply_new_state;
}
diff --git a/drivers/pinctrl/freescale/pinctrl-imx.c b/drivers/pinctrl/freescale/pinctrl-imx.c
index daf28bc5661d..2c7c1de9cca7 100644
--- a/drivers/pinctrl/freescale/pinctrl-imx.c
+++ b/drivers/pinctrl/freescale/pinctrl-imx.c
@@ -356,7 +356,7 @@ static int imx_pinconf_get_mmio(struct pinctrl_dev *pctldev, unsigned pin_id,
if (pin_reg->conf_reg == -1) {
dev_err(ipctl->dev, "Pin(%s) does not support config function\n",
info->pins[pin_id].name);
- return -EINVAL;
+ return -ENOTSUPP;
}
*config = readl(ipctl->base + pin_reg->conf_reg);
@@ -391,7 +391,7 @@ static int imx_pinconf_set_mmio(struct pinctrl_dev *pctldev,
if (pin_reg->conf_reg == -1) {
dev_err(ipctl->dev, "Pin(%s) does not support config function\n",
info->pins[pin_id].name);
- return -EINVAL;
+ return -ENOTSUPP;
}
dev_dbg(ipctl->dev, "pinconf set pin %s\n",
--
2.25.1
Powered by blists - more mailing lists