[PATCH] pinctrl: Support pin that does not support configuration option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxxx>
Tested-by: Angelo Compagnucci <angelo@xxxxxxxxxxxxxxxxxxxx>
---
 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




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux