From 00b1bad961fff51db71573f5fc6e4e35b47381b2 Mon Sep 17 00:00:00 2001 From: Marek BehĂșn Date: Wed, 27 Apr 2022 12:41:49 +0200 Subject: net: mdio-uclass: add dm_phy_find_by_ofnode() helper Add helper to resolve PHY node from it's ofnode via DM MDIO subsystem. Signed-off-by: Marek BehĂșn Reviewed-by: Ramon Fried Reviewed-by: Stefan Roese --- include/miiphy.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/miiphy.h') diff --git a/include/miiphy.h b/include/miiphy.h index 110921f20d2..c66a1845b58 100644 --- a/include/miiphy.h +++ b/include/miiphy.h @@ -188,6 +188,15 @@ int dm_mdio_write(struct udevice *mdio_dev, int addr, int devad, int reg, u16 va */ int dm_mdio_reset(struct udevice *mdio_dev); +/** + * dm_phy_find_by_ofnode - Find PHY device by ofnode + * + * @phynode: PHY's ofnode + * + * Return: pointer to phy_device, or NULL on error + */ +struct phy_device *dm_phy_find_by_ofnode(ofnode phynode); + /** * dm_mdio_phy_connect - Wrapper over phy_connect for DM MDIO * -- cgit v1.2.3