From: Frank.Li@oss.nxp.com
To: Linus Walleij <linusw@kernel.org>,
linux-gpio@vger.kernel.org (open list:PIN CONTROL SUBSYSTEM),
linux-kernel@vger.kernel.org (open list)
Cc: imx@lists.linux.dev, Frank Li <Frank.Li@nxp.com>
Subject: [PATCH 1/1] pinctrl: pinctrl-generic-mux: use mux_state_try_select()
Date: Wed, 15 Jul 2026 15:35:45 -0400 [thread overview]
Message-ID: <20260715193546.2852108-1-Frank.Li@oss.nxp.com> (raw)
From: Frank Li <Frank.Li@nxp.com>
Use mux_state_try_select() instead of mux_state_select() so that the
consumer driver does not block during probe when the mux state has
already been selected.
mux_state_try_select() returns -EBUSY if the requested state is already
selected, allowing the driver to handle the condition without waiting.
Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
Previous earily version pinctrl-generic-mux manage this resouce to avoid
call mux_state_select(). But review or respin patch, remove these check.
anyways mux_state_try_select() better method.
---
drivers/pinctrl/pinctrl-generic-mux.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/pinctrl-generic-mux.c b/drivers/pinctrl/pinctrl-generic-mux.c
index da5a5ec015833..202b72351efb7 100644
--- a/drivers/pinctrl/pinctrl-generic-mux.c
+++ b/drivers/pinctrl/pinctrl-generic-mux.c
@@ -93,7 +93,7 @@ static int mux_pinmux_set_mux(struct pinctrl_dev *pctldev,
function = pinmux_generic_get_function(pctldev, func_selector);
func = function->data;
- ret = mux_state_select(func->mux_state);
+ ret = mux_state_try_select(func->mux_state);
if (ret)
return ret;
--
2.43.0
next reply other threads:[~2026-07-15 19:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-15 19:35 Frank.Li [this message]
2026-07-24 21:42 ` [PATCH 1/1] pinctrl: pinctrl-generic-mux: use mux_state_try_select() 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=20260715193546.2852108-1-Frank.Li@oss.nxp.com \
--to=frank.li@oss.nxp.com \
--cc=Frank.Li@nxp.com \
--cc=imx@lists.linux.dev \
--cc=linusw@kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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