From: Frank Li <Frank.li@nxp.com>
To: Linus Walleij <linusw@kernel.org>
Cc: "Peter Rosin" <peda@axentia.se>, "Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Rafał Miłecki" <rafal@milecki.pl>,
"Sascha Hauer" <s.hauer@pengutronix.de>,
"Pengutronix Kernel Team" <kernel@pengutronix.de>,
"Fabio Estevam" <festevam@gmail.com>,
linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
devicetree@vger.kernel.org, imx@lists.linux.dev,
linux-arm-kernel@lists.infradead.org,
"Haibo Chen" <haibo.chen@nxp.com>
Subject: Re: [PATCH v2 3/6] pinctrl: add optional .release_mux() callback
Date: Fri, 27 Feb 2026 10:32:30 -0500 [thread overview]
Message-ID: <aaG5DpyET-vri-Vj@lizhi-Precision-Tower-5810> (raw)
In-Reply-To: <CAD++jLkhH566rqkkQfWnOiAokxB8mLXw=eqrVN_pgs+dd8TkxQ@mail.gmail.com>
On Fri, Feb 27, 2026 at 10:07:05AM +0100, Linus Walleij wrote:
> On Thu, Feb 26, 2026 at 12:55 AM Frank Li <Frank.Li@nxp.com> wrote:
>
> > Add an optional .release_mux() callback to the pinmux_ops.
> >
> > Some devices require releasing resources that were previously acquired in
> > .set_mux(). Providing a dedicated .release_mux() callback allows drivers to
> > properly clean up hardware state or associated resources when a mux
> > function is no longer active.
> >
> > The callback is optional and does not affect existing drivers.
> >
> > Signed-off-by: Frank Li <Frank.Li@nxp.com>
>
> Can you explain why you need this custom code for this?
>
> Nominally pin control defines and puts the hardware into a
> number of states such as:
> "default"
> "idle"
> "sleep"
> "init"
>
> Usually (at least for silicon) what .release_mux() would to
> is semantically equivalent to a transition into the "init" or
> "sleep" state. And if these are not descriptive enough you can
> even define a "released" state.
>
> Is it not possible to reach the set-up of the hardware that you
> are desiring by just defining such a relaxed state?
I am not familiar with pinctrl code. I just need a place to call a callback
which do opposite work at .set_mux() function.
I see pair function pinmux_enable_setting() call .set_mux() and
pinmux_disable_setting() just missing do oppsite work of .set_mux();
I may think too simple. I just do insmod/rmmod test. Any suggestion where
is good place to put it?
Does it call pair pinmux_enable(disable)_setting when switch state?
Frank
>
> Yours,
> Linus Walleij
next prev parent reply other threads:[~2026-02-27 15:32 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-25 23:55 [PATCH v2 0/6] pinctrl: Add generic pinctrl for board-level mux chips Frank Li
2026-02-25 23:55 ` [PATCH v2 1/6] mux: add devm_mux_control_get_from_np() to get mux from child node Frank Li
2026-02-25 23:55 ` [PATCH v2 2/6] dt-bindings: pinctrl: Add generic pinctrl for board-level mux chips Frank Li
2026-02-27 9:02 ` Linus Walleij
2026-03-06 0:57 ` Rob Herring (Arm)
2026-02-25 23:55 ` [PATCH v2 3/6] pinctrl: add optional .release_mux() callback Frank Li
2026-02-27 9:07 ` Linus Walleij
2026-02-27 15:32 ` Frank Li [this message]
2026-03-02 10:12 ` Linus Walleij
2026-02-25 23:55 ` [PATCH v2 4/6] pinctrl: add generic board-level pinctrl driver using mux framework Frank Li
2026-02-27 9:09 ` Daniel Baluta
2026-02-27 9:20 ` Linus Walleij
2026-02-27 15:22 ` Frank Li
2026-03-02 10:11 ` Linus Walleij
2026-03-05 17:37 ` Frank Li
2026-03-08 23:49 ` Linus Walleij
2026-02-25 23:55 ` [PATCH v2 5/6] arm64: dts: imx8mp-evk: add board-level mux for CAN2 and MICFIL Frank Li
2026-02-25 23:55 ` [PATCH v2 6/6] arm64: dts: imx8mp-evk: add flexcan2 overlay file Frank Li
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=aaG5DpyET-vri-Vj@lizhi-Precision-Tower-5810 \
--to=frank.li@nxp.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=haibo.chen@nxp.com \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=krzk+dt@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peda@axentia.se \
--cc=rafal@milecki.pl \
--cc=robh@kernel.org \
--cc=s.hauer@pengutronix.de \
/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