* [PATCH 1/1] pinctrl: pinctrl-generic-mux: use mux_state_try_select()
@ 2026-07-15 19:35 Frank.Li
2026-07-24 21:42 ` Linus Walleij
0 siblings, 1 reply; 2+ 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] 2+ messages in thread
* Re: [PATCH 1/1] pinctrl: pinctrl-generic-mux: use mux_state_try_select()
2026-07-15 19:35 [PATCH 1/1] pinctrl: pinctrl-generic-mux: use mux_state_try_select() Frank.Li
@ 2026-07-24 21:42 ` Linus Walleij
0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2026-07-24 21:42 UTC (permalink / raw)
To: Frank.Li; +Cc: open list:PIN CONTROL SUBSYSTEM, open list, imx, Frank Li
On Wed, Jul 15, 2026 at 9:36 PM <Frank.Li@oss.nxp.com> wrote:
> 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.
OK makes sense, patch applied!
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-07-24 21:42 UTC | newest]
Thread overview: 2+ 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-24 21:42 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox