From: Herve Codina <herve.codina@bootlin.com>
To: Peter Rosin <peda@lysator.liu.se>
Cc: Andrew Lunn <andrew@lunn.ch>, Rob Herring <robh@kernel.org>,
Saravana Kannan <saravanak@kernel.org>,
Wolfram Sang <wsa+renesas@sang-engineering.com>,
Andi Shyti <andi.shyti@kernel.org>,
linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
Allan Nielsen <allan.nielsen@microchip.com>,
Horatiu Vultur <horatiu.vultur@microchip.com>,
Daniel Machon <daniel.machon@microchip.com>,
Steen Hegelund <steen.hegelund@microchip.com>,
Luca Ceresoli <luca.ceresoli@bootlin.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [PATCH v8 2/3] i2c: mux: Set adapter physical device
Date: Wed, 8 Jul 2026 11:11:02 +0200 [thread overview]
Message-ID: <20260708111102.468f9171@bootlin.com> (raw)
In-Reply-To: <8eecaa15-460f-4f39-b65f-98b8334994be@lysator.liu.se>
Hi Peter,
On Sat, 4 Jul 2026 11:28:21 +0200
Peter Rosin <peda@lysator.liu.se> wrote:
> On 2026-06-30 12:30, Herve Codina wrote:
> > For i2c muxes, the parent of the mux adapter device is the adapter
> > device the mux is connected to.
> >
> > This parent is not the physical device related to the mux adapter.
> > Indeed, the physical device of the mux adapter is the mux device itself.
> >
> > Fill the adap.physdev with the mux device.
> >
> > Signed-off-by: Herve Codina <herve.codina@bootlin.com>
> > Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
> > ---
> > drivers/i2c/i2c-mux.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/i2c/i2c-mux.c b/drivers/i2c/i2c-mux.c
> > index 681a201c239b..f4e73e7a0e33 100644
> > --- a/drivers/i2c/i2c-mux
> > +++ b/drivers/i2c/i2c-mux.c
> > @@ -315,6 +315,7 @@ int i2c_mux_add_adapter(struct i2c_mux_core *muxc,
> > priv->adap.algo = &priv->algo;
> > priv->adap.algo_data = priv;
> > priv->adap.dev.parent = &parent->dev;
> > + priv->adap.physdev = muxc->dev;
> > priv->adap.retries = parent->retries;
> > priv->adap.timeout = parent->timeout;
> > priv->adap.quirks = parent->quirks;
>
> Given how similar the implementation details are for address translators
> and muxes, I expect that this pattern is present there as well.
>
> I.e. I think a line with "chan->adap.physdev = dev;" should be added to
> the i2c_atr_add_adapter() function (in the obvious place).
>
Yes, I can add the physdev setting for i2c address translators.
I think also that you will expect the same kind of modification done for
muxes by patch 3 (create missing devlink) to be done for atr.
On my side, I don't have any address translators devices on my boards
I won't be able to test modifications for atr.
Do you think I should add both new patches related to atr (setting physdev
and creating missing devlink) in this series (again, I cannot test atr
modifications on my side) ?
Best regards,
Hervé
next prev parent reply other threads:[~2026-07-08 9:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-30 10:30 [PATCH v8 0/3] lan966x pci device: Add support for SFPs, i2c part Herve Codina
2026-06-30 10:30 ` [PATCH v8 1/3] i2c: core: Introduce i2c_get_adapter_physdev() Herve Codina
2026-06-30 10:30 ` [PATCH v8 2/3] i2c: mux: Set adapter physical device Herve Codina
2026-07-04 9:28 ` Peter Rosin
2026-07-08 9:11 ` Herve Codina [this message]
2026-06-30 10:30 ` [PATCH v8 3/3] i2c: mux: Create missing devlink between mux and " Herve Codina
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=20260708111102.468f9171@bootlin.com \
--to=herve.codina@bootlin.com \
--cc=allan.nielsen@microchip.com \
--cc=andi.shyti@kernel.org \
--cc=andrew@lunn.ch \
--cc=daniel.machon@microchip.com \
--cc=horatiu.vultur@microchip.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luca.ceresoli@bootlin.com \
--cc=peda@lysator.liu.se \
--cc=robh@kernel.org \
--cc=saravanak@kernel.org \
--cc=steen.hegelund@microchip.com \
--cc=thomas.petazzoni@bootlin.com \
--cc=wsa+renesas@sang-engineering.com \
/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