From: Vladimir Oltean <olteanv@gmail.com>
To: Vinod Koul <vkoul@kernel.org>
Cc: Inochi Amaoto <inochiama@gmail.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
Randy Dunlap <rdunlap@infradead.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Manivannan Sadhasivam <mani@kernel.org>,
Rhys Tumelty <rhys@tumelty.co.uk>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-phy@lists.infradead.org, Yixun Lan <dlan@gentoo.org>,
Longbin Li <looong.bin@gmail.com>
Subject: Re: [PATCH v4 3/5] phy: core: Add phy bulk data helper functions
Date: Wed, 7 Oct 2026 00:15:47 +0300 [thread overview]
Message-ID: <20261006211547.lfrhgdkixbbbyiju@skbuf> (raw)
In-Reply-To: <asN4I1cpVb5HLNu7@parshuram>
On Mon, Oct 05, 2026 at 12:12:51PM +0200, Vinod Koul wrote:
> On 29-09-26, 16:52, Inochi Amaoto wrote:
> > Add several helper functions that allow drivers to get several phy
> > consumers in one operation. If any of the phy cannot be acquired then
> > any phys that were got will be put before returning to the caller.
>
> Do we have many such examples? Phy is not a many resource like
> clock/regulators... Do we really need this. How many in kernel users
> will benefit from this API?
I have another case for more than 1 PHY. On some NXP boards, retimers
like phy-ds125df111.c are used for networking, but not in the way you'd
expect, i.e. not like this:
SerDes SerDes
Lane A Lane B
RX TX RX TX
^ | ^ |
| | | |
| v | v
Retimer C Retimer D
ch0 ch1 ch0 ch1
^ | ^ |
| | | |
| | | |
| | | |
| v | v
but like this:
SerDes SerDes SerDes SerDes
Lane A Lane B Lane A Lane B
RX RX TX TX
^ ^ | |
| | | |
| | v v
Retimer C Retimer D
ch0 ch1 ch0 ch1
^ ^ | |
| | | |
| | | |
| | | |
| | v v
Since the retimer channels are bidirectional and not hardcoded for RX/TX
function (unlike the SerDes differential pairs), this is not a problem.
Since one SerDes lane is one struct phy, its RX side and its TX side
need to configure the channels of physically different retimer devices.
The retimer driver was modeled to permit this configuration, and it
exposes each channel as a separate struct phy. The implication is that
any consumer of this retimer needs two 'phys' phandles to have both RX
and TX retimed.
Actually I'm interested in this series too, specifically due to retimers/
repeaters. I believe they should gain core PHY support, because the
current support is very sporadic and not homogenous.
Today all SerDes PHYs capable of supporting repeaters/retimers need to
manually acquire their phy->repeater using phy_get(), and forward all
ops from their consumer to the repeater as well. But this creates the
odd situation where maybe the SerDes PHY doesn't need to do anything on,
say, phy_init(), yet it needs to implement it anyway, just to call
phy_init(phy->repeater). The existence of downstream repeaters can be
made very transparent to the top-level struct phy (the one that the
consumer interacts with).
And because in general, there could be >1 repeater in the signal path,
I was thinking the bulk API could be a good candidate for managing the
list of repeaters of a PHY.
next prev parent reply other threads:[~2026-10-06 21:15 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-29 8:52 [PATCH v4 0/5] phy: core: Add phy bulk helpers support Inochi Amaoto
2026-09-29 8:52 ` [PATCH v4 1/5] phy: core: Add common helper to add phy phandle device link Inochi Amaoto
2026-09-29 8:52 ` [PATCH v4 2/5] phy: core: Add common helper for get phy phandle by index Inochi Amaoto
2026-09-29 8:52 ` [PATCH v4 3/5] phy: core: Add phy bulk data helper functions Inochi Amaoto
2026-09-30 8:22 ` Andy Shevchenko
2026-09-30 8:59 ` Inochi Amaoto
2026-10-05 10:12 ` Vinod Koul
2026-10-05 11:41 ` Inochi Amaoto
2026-10-06 20:49 ` Vladimir Oltean
2026-10-06 21:15 ` Vladimir Oltean [this message]
2026-09-29 8:52 ` [PATCH v4 4/5] phy: core: Add managed " Inochi Amaoto
2026-09-30 8:29 ` Andy Shevchenko
2026-09-30 9:21 ` Inochi Amaoto
2026-09-30 9:23 ` Inochi Amaoto
2026-09-30 9:44 ` Andy Shevchenko
2026-09-29 8:52 ` [PATCH v4 5/5] doc: phy: Document some bulk " Inochi Amaoto
2026-09-30 8:30 ` Andy Shevchenko
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=20261006211547.lfrhgdkixbbbyiju@skbuf \
--to=olteanv@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=corbet@lwn.net \
--cc=dlan@gentoo.org \
--cc=inochiama@gmail.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=looong.bin@gmail.com \
--cc=mani@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=rdunlap@infradead.org \
--cc=rhys@tumelty.co.uk \
--cc=skhan@linuxfoundation.org \
--cc=vkoul@kernel.org \
/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®