All of lore.kernel.org
 help / color / mirror / Atom feed
From: Manivannan Sadhasivam <mani@kernel.org>
To: Inochi Amaoto <inochiama@gmail.com>
Cc: Vinod Koul <vkoul@kernel.org>,
	 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>,
	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: Sun, 18 Oct 2026 18:09:49 +0530	[thread overview]
Message-ID: <atS9fkULEWfCbVVm@debian> (raw)
In-Reply-To: <asOMP3uJJmdpfvtt@inochi.infowork>

On Mon, Oct 05, 2026 at 07:41:52PM +0800, Inochi Amaoto wrote:
> 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 guess the following driver may benefit from bulk api. Most of them
> are PCIe drivers....
> 
> drivers/ata/ahci_imx.c
> drivers/pci/controller/cadence/pcie-cadence.c
> drivers/pci/controller/dwc/pci-dra7xx.c
> drivers/pci/controller/dwc/pcie-tegra194.c
> drivers/pci/controller/pcie-rockchip.c
> drivers/pci/controller/dwc/pcie-qcom.c
> 
> Note: I mean the bulk api, not just the things I added. I guess many
> may want devm_phy_bulk_get() or devm_of_phy_bulk_get() instead of
> devm_phy_bulk_get_all().
> 

No. I don't think the PCIe host controllers need the PHY bulk APIs. Most of the
time they need to control each PHY independently in a multi-port setup. So
having the bulk API doesn't seem logical to me.

- Mani

-- 
மணிவண்ணன் சதாசிவம்

WARNING: multiple messages have this Message-ID (diff)
From: Manivannan Sadhasivam <mani@kernel.org>
To: Inochi Amaoto <inochiama@gmail.com>
Cc: Vinod Koul <vkoul@kernel.org>,
	 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>,
	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: Sun, 18 Oct 2026 18:09:49 +0530	[thread overview]
Message-ID: <atS9fkULEWfCbVVm@debian> (raw)
In-Reply-To: <asOMP3uJJmdpfvtt@inochi.infowork>

On Mon, Oct 05, 2026 at 07:41:52PM +0800, Inochi Amaoto wrote:
> 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 guess the following driver may benefit from bulk api. Most of them
> are PCIe drivers....
> 
> drivers/ata/ahci_imx.c
> drivers/pci/controller/cadence/pcie-cadence.c
> drivers/pci/controller/dwc/pci-dra7xx.c
> drivers/pci/controller/dwc/pcie-tegra194.c
> drivers/pci/controller/pcie-rockchip.c
> drivers/pci/controller/dwc/pcie-qcom.c
> 
> Note: I mean the bulk api, not just the things I added. I guess many
> may want devm_phy_bulk_get() or devm_of_phy_bulk_get() instead of
> devm_phy_bulk_get_all().
> 

No. I don't think the PCIe host controllers need the PHY bulk APIs. Most of the
time they need to control each PHY independently in a multi-port setup. So
having the bulk API doesn't seem logical to me.

- Mani

-- 
மணிவண்ணன் சதாசிவம்

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

  parent reply	other threads:[~2026-10-18 12:40 UTC|newest]

Thread overview: 37+ 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 ` 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   ` 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   ` Inochi Amaoto
2026-09-29  8:52 ` [PATCH v4 3/5] phy: core: Add phy bulk data helper functions Inochi Amaoto
2026-09-29  8:52   ` Inochi Amaoto
2026-09-30  8:22   ` Andy Shevchenko
2026-09-30  8:22     ` Andy Shevchenko
2026-09-30  8:59     ` Inochi Amaoto
2026-09-30  8:59       ` Inochi Amaoto
2026-10-05 10:12   ` Vinod Koul
2026-10-05 10:12     ` Vinod Koul
2026-10-05 11:41     ` Inochi Amaoto
2026-10-05 11:41       ` Inochi Amaoto
2026-10-06 20:49       ` Vladimir Oltean
2026-10-06 20:49         ` Vladimir Oltean
2026-10-18 12:39       ` Manivannan Sadhasivam [this message]
2026-10-18 12:39         ` Manivannan Sadhasivam
2026-10-06 21:15     ` Vladimir Oltean
2026-10-06 21:15       ` Vladimir Oltean
2026-09-29  8:52 ` [PATCH v4 4/5] phy: core: Add managed " Inochi Amaoto
2026-09-29  8:52   ` Inochi Amaoto
2026-09-30  8:29   ` Andy Shevchenko
2026-09-30  8:29     ` Andy Shevchenko
2026-09-30  9:21     ` Inochi Amaoto
2026-09-30  9:21       ` Inochi Amaoto
2026-09-30  9:23       ` Inochi Amaoto
2026-09-30  9:23         ` Inochi Amaoto
2026-09-30  9:44       ` Andy Shevchenko
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-29  8:52   ` Inochi Amaoto
2026-09-29  8:59   ` sashiko-bot
2026-09-30  8:30   ` Andy Shevchenko
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=atS9fkULEWfCbVVm@debian \
    --to=mani@kernel.org \
    --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=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.