From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: Wentao Liang <vulab@iscas.ac.cn>
Cc: peda@lysator.liu.se, linux-i2c@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] i2c: mux: demux-pinctrl: Release pinctrl handles on deactivation
Date: Tue, 3 Nov 2026 11:04:21 +0200 [thread overview]
Message-ID: <aumjke-mSGP8WVl1@shikoro> (raw)
In-Reply-To: <20261103082905.1167633-1-vulab@iscas.ac.cn>
[-- Attachment #1: Type: text/plain, Size: 1001 bytes --]
On Tue, Nov 03, 2026 at 08:29:05AM +0000, Wentao Liang wrote:
> Each master activation calls devm_pinctrl_get() against the parent I2C
> controller device. Switching or removing the demux only releases the
> adapter reference, so the pinctrl reference and its devres entry persist
> until the parent controller is removed. Repeated switches accumulate
> these entries. Activation failures after obtaining the handle retain it
> too.
>
> Use pinctrl_get() and keep the handle with the active channel. Release
> it when activation fails or the channel is deactivated, before dropping
> the parent adapter reference and reverting the device-tree changeset.
> Keep the no-pinctrl case working by storing NULL when get returns
> -ENODEV.
>
> Fixes: 50a5ba876908 ("i2c: mux: demux-pinctrl: add driver")
> Cc: stable@vger.kernel.org
> Assisted-by: DeepSeek-V4.1-Flash and OpenAI Codex
> Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
To get a better picture, how did you test this?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2026-11-03 9:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 8:29 Wentao Liang
2026-11-03 9:04 ` Wolfram Sang [this message]
2026-11-03 9:21 ` Krzysztof Kozlowski
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=aumjke-mSGP8WVl1@shikoro \
--to=wsa+renesas@sang-engineering.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peda@lysator.liu.se \
--cc=stable@vger.kernel.org \
--cc=vulab@iscas.ac.cn \
/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
all inboxes | Powered by JetHome®