All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] pinctrl: pinctrl-generic-mux: use mux_state_try_select()
@ 2026-07-15 19:35 Frank.Li
  2026-07-15 19:51 ` sashiko-bot
  0 siblings, 1 reply; 3+ messages in thread
From: Frank.Li @ 2026-07-15 19:35 UTC (permalink / raw)
  To: Linus Walleij, open list:PIN CONTROL SUBSYSTEM, open list; +Cc: imx, Frank Li

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-07-15 20:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-15 19:35 [PATCH 1/1] pinctrl: pinctrl-generic-mux: use mux_state_try_select() Frank.Li
2026-07-15 19:51 ` sashiko-bot
2026-07-15 20:12   ` Frank Li

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.