Thread (18 messages) 18 messages, 4 authors, 2026-03-08

Re: [PATCH v2 4/6] pinctrl: add generic board-level pinctrl driver using mux framework

From: Linus Walleij <linusw@kernel.org>
Date: 2026-03-08 23:49:27
Also in: imx, linux-devicetree, linux-gpio, lkml

On Thu, Mar 5, 2026 at 6:38 PM Frank Li [off-list ref] wrote:
init state is before probe if exist, which not fit this case because:
- on board mux need be enabled before probe, some device need communicate
with periphal at probe, such as SD card. SD data/cmd line must be ready
to scan SD, similar case for all mtd devices.

if add new state "release",  when the pinctrl may switch between default,
sleep, ... , "release" have to switch between switch state, such as default
 -> sleep have to change to default->release->sleep.

mux device also have idle state, which map to pinctrl's "init" or "sleep"
state.

The key difference should be
- pinctrl can uncondtional switch state.
- mux frame have to use pair mux_control_(de)select() to switch state.

So, I think just need a hook in pinctrl system to call mux_control_deselect()
when switch state and release resource.
The problem is that this becomes essentially a revert of:
commit 2243a87d90b42eb38bc281957df3e57c712b5e56
"pinctrl: avoid duplicated calling enable_pinmux_setting for a pin"
from 2014.

.set_mux() used to be called .enable() and when .disable() was
deleted in this commit, only .enable() remained and that was later
renamed to .set_mux().

By essentially adding back the .disable() callback under a new
name, you risk to re-introduce the problem solved by this
committ.

So you need to analyse that committ log a bit, reference it
and explain why you are *not* re-introducing this problem by
adding back the callback.

Yours,
Linus Walleij
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help