mbox series

[treewide,0/7] phy: Add devm_of_phy_optional_get() helper

Message ID cover.1674036164.git.geert+renesas@glider.be (mailing list archive)
Headers show
Series phy: Add devm_of_phy_optional_get() helper | expand


Geert Uytterhoeven Jan. 18, 2023, 10:15 a.m. UTC
Hi all,

While there exist several optional_get() PHY helper functions, there is
no optional variant of devm_of_phy_get(), leading to several drivers
implementing this theirselves, sometimes in buggy ways.

Hence this series introduces a devm_of_phy_optional_get() helper(), and
converts existing users of devm_of_phy_get() where appropriate.

This series been compile-tested only, but the new helper itself has been
tested with a new user I am about to submit.

Thanks for your comments!

Geert Uytterhoeven (7):
  phy: Add devm_of_phy_optional_get() helper
  net: fman: memac: Convert to devm_of_phy_optional_get()
  net: lan966x: Convert to devm_of_phy_optional_get()
  net: ethernet: ti: am65-cpsw: Convert to devm_of_phy_optional_get()
  PCI: tegra: Convert to devm_of_phy_optional_get()
  usb: host: ehci-exynos: Convert to devm_of_phy_optional_get()
  usb: host: ohci-exynos: Convert to devm_of_phy_optional_get()

 .../net/ethernet/freescale/fman/fman_memac.c  |  8 +++---
 .../ethernet/microchip/lan966x/lan966x_main.c |  5 ++--
 drivers/net/ethernet/ti/am65-cpsw-nuss.c      |  6 ++---
 drivers/pci/controller/pci-tegra.c            |  5 +---
 drivers/phy/phy-core.c                        | 26 +++++++++++++++++++
 drivers/usb/host/ehci-exynos.c                | 24 +++++------------
 drivers/usb/host/ohci-exynos.c                | 24 +++++------------
 include/linux/phy/phy.h                       |  9 ++++++
 8 files changed, 59 insertions(+), 48 deletions(-)