lkml.org 
[lkml]   [2021]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] pinctrl: Support pin that does not support configuration option
Date
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@amarulasolutions.com>
Tested-by: Angelo Compagnucci <angelo@amarulasolutions.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
\
 
 \ /
  Last update: 2021-01-30 10:21    [W:0.892 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site