summaryrefslogtreecommitdiff
path: root/drivers/of/of_net.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/of/of_net.c')
-rw-r--r--drivers/of/of_net.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/of/of_net.c b/drivers/of/of_net.c
index 84215c1929c4..73e14184aafe 100644
--- a/drivers/of/of_net.c
+++ b/drivers/of/of_net.c
@@ -15,8 +15,9 @@
* of_get_phy_mode - Get phy mode for given device_node
* @np: Pointer to the given device_node
*
- * The function gets phy interface string from property 'phy-mode',
- * and return its index in phy_modes table, or errno in error case.
+ * The function gets phy interface string from property 'phy-mode' or
+ * 'phy-connection-type', and return its index in phy_modes table, or errno in
+ * error case.
*/
int of_get_phy_mode(struct device_node *np)
{
@@ -25,6 +26,8 @@ int of_get_phy_mode(struct device_node *np)
err = of_property_read_string(np, "phy-mode", &pm);
if (err < 0)
+ err = of_property_read_string(np, "phy-connection-type", &pm);
+ if (err < 0)
return err;
for (i = 0; i < PHY_INTERFACE_MODE_MAX; i++)