From 123ca114e07ecf28aa2538748d733e2b22d8b8b5 Mon Sep 17 00:00:00 2001 From: Marek BehĂșn Date: Thu, 7 Apr 2022 00:33:01 +0200 Subject: net: introduce helpers to get PHY interface mode from a device/ofnode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add helpers ofnode_read_phy_mode() and dev_read_phy_mode() to parse the "phy-mode" / "phy-connection-type" property. Add corresponding UT test. Use them treewide. This allows us to inline the phy_get_interface_by_name() into ofnode_read_phy_mode(), since the former is not used anymore. Signed-off-by: Marek BehĂșn Reviewed-by: Ramon Fried Tested-by: Patrice Chotard --- include/phy.h | 8 -------- 1 file changed, 8 deletions(-) (limited to 'include/phy.h') diff --git a/include/phy.h b/include/phy.h index 9ea4bd42db..399e050aba 100644 --- a/include/phy.h +++ b/include/phy.h @@ -568,14 +568,6 @@ int phy_xilinx_gmii2rgmii_init(void); int board_phy_config(struct phy_device *phydev); int get_phy_id(struct mii_dev *bus, int addr, int devad, u32 *phy_id); -/** - * phy_get_interface_by_name() - Look up a PHY interface name - * - * @str: PHY interface name, e.g. "mii" - * @return: PHY_INTERFACE_MODE_... value, or -1 if not found - */ -int phy_get_interface_by_name(const char *str); - /** * phy_interface_is_rgmii - Convenience function for testing if a PHY interface * is RGMII (all variants) -- cgit v1.2.3