Linux-PHY Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] phy: core: Add phy bulk helpers support
@ 2026-09-04  8:37 Inochi Amaoto
  2026-09-04  8:37 ` [PATCH v2 1/4] phy: core: Add common helper to add phy phandle device link Inochi Amaoto
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Inochi Amaoto @ 2026-09-04  8:37 UTC (permalink / raw)
  To: Vinod Koul, Neil Armstrong, Manivannan Sadhasivam
  Cc: Andy Shevchenko, Inochi Amaoto, linux-phy, linux-kernel,
	Yixun Lan, Longbin Li

As discussed in [1], some drivers may do not care the difference between
phys. Instead, they only need to treat them as a group and operate them
together. This means a bulk operation is needed.

Add some bulk helper functions for phy core by referencing the design of
clock/reset subsystem. This can relieve the driver owners' life who needs
to handle many phys, as well as each phy error reporting.

[1] https://lore.kernel.org/linux-pci/ak9KzNFF26B0Kttz@ashevche-desk.local/

Changed from v1:
- https://lore.kernel.org/linux-phy/20260831025319.94886-1-inochiama@gmail.com/
patch 1:
1. Update document.
patch 2:
1. Fix document format.
2. Fix several document description.
patch 3:
1. Split into two patches: one for non devm helpers, one for devm helpers.
2. All the bulk helper now use unsigned int for counts.
3. Fix multiple the while loop statement.
4. Rename of_phy_get_parent_count() to of_phy_get_count().
5. Fix some 80 line function problems.
6. Use PTR_ERR_OR_ZERO() to simplify the error handle.
7. Fix zero value in the document
8. Use two separate release function for devm helpers.

Inochi Amaoto (4):
  phy: core: Add common helper to add phy phandle device link
  phy: core: Add common helper for get phy phandle by index
  phy: core: Add phy bulk data helper functions
  phy: core: Add managed phy bulk data helper functions

 drivers/phy/phy-core.c  | 700 +++++++++++++++++++++++++++++++++++++---
 include/linux/phy/phy.h | 186 +++++++++++
 2 files changed, 850 insertions(+), 36 deletions(-)

--
2.55.0


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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-09-05  8:14 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-04  8:37 [PATCH v2 0/4] phy: core: Add phy bulk helpers support Inochi Amaoto
2026-09-04  8:37 ` [PATCH v2 1/4] phy: core: Add common helper to add phy phandle device link Inochi Amaoto
2026-09-04  8:50   ` sashiko-bot
2026-09-05  8:02   ` Andy Shevchenko
2026-09-04  8:37 ` [PATCH v2 2/4] phy: core: Add common helper for get phy phandle by index Inochi Amaoto
2026-09-04  8:48   ` sashiko-bot
2026-09-05  8:14   ` Andy Shevchenko
2026-09-04  8:37 ` [PATCH v2 3/4] phy: core: Add phy bulk data helper functions Inochi Amaoto
2026-09-04  8:50   ` sashiko-bot
2026-09-04  8:37 ` [PATCH v2 4/4] phy: core: Add managed " Inochi Amaoto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox