From 123ca114e07ecf28aa2538748d733e2b22d8b8b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Beh=C3=BAn?= 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 --- arch/sandbox/dts/test.dts | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/sandbox/dts/test.dts') diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts index e536943503..5b38ee4a5f 100644 --- a/arch/sandbox/dts/test.dts +++ b/arch/sandbox/dts/test.dts @@ -535,6 +535,7 @@ reg = <0x10007000 0x1000>; fake-host-hwaddr = [00 00 66 44 22 77]; phy-handle = <ðphy1>; + phy-mode = "2500base-x"; }; dsa_eth0: dsa-test-eth { -- cgit v1.2.1