From: Richard Fitzgerald <rf@opensource.cirrus.com>
To: <linus.walleij@linaro.org>
Cc: <linux-kernel@vger.kernel.org>, <linux-gpio@vger.kernel.org>,
<patches@opensource.cirrus.com>,
Richard Fitzgerald <rf@opensource.cirrus.com>
Subject: [PATCH 2/3] pinctrl: madera: Return ENOTSUPP for unsupported pin attributes
Date: Tue, 7 Aug 2018 10:32:25 +0100 [thread overview]
Message-ID: <20180807093226.5624-2-rf@opensource.cirrus.com> (raw)
In-Reply-To: <20180807093226.5624-1-rf@opensource.cirrus.com>
The pin_config_[get|set] functions should return ENOTSUPP if
the requested attribute isn't supported.
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
---
drivers/pinctrl/cirrus/pinctrl-madera-core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/cirrus/pinctrl-madera-core.c b/drivers/pinctrl/cirrus/pinctrl-madera-core.c
index 4f9b7e3b7cf2..4ba56ca5a9be 100644
--- a/drivers/pinctrl/cirrus/pinctrl-madera-core.c
+++ b/drivers/pinctrl/cirrus/pinctrl-madera-core.c
@@ -801,7 +801,7 @@ static int madera_pin_conf_get(struct pinctrl_dev *pctldev, unsigned int pin,
result = 1;
break;
default:
- break;
+ return -ENOTSUPP;
}
*config = pinconf_to_config_packed(param, result);
@@ -905,7 +905,7 @@ static int madera_pin_conf_set(struct pinctrl_dev *pctldev, unsigned int pin,
conf[1] &= ~MADERA_GP1_DIR;
break;
default:
- break;
+ return -ENOTSUPP;
}
++configs;
--
2.11.0
next prev parent reply other threads:[~2018-08-07 9:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-07 9:32 [PATCH 1/3] pinctrl: madera: Set is_generic Richard Fitzgerald
2018-08-07 9:32 ` Richard Fitzgerald [this message]
2018-08-29 8:42 ` [PATCH 2/3] pinctrl: madera: Return ENOTSUPP for unsupported pin attributes Linus Walleij
2018-08-07 9:32 ` [PATCH 3/3] pinctrl: madera: Fix missing space in debugfs output Richard Fitzgerald
2018-08-29 8:44 ` Linus Walleij
2018-08-10 21:10 ` [PATCH 1/3] pinctrl: madera: Set is_generic Linus Walleij
2018-08-29 8:41 ` Linus Walleij
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=20180807093226.5624-2-rf@opensource.cirrus.com \
--to=rf@opensource.cirrus.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@opensource.cirrus.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).