Skip to content

Commit

Permalink
net: phy: fixed-link: read link parameters from devicetree
Browse files Browse the repository at this point in the history
Implement the missing reading of the fixed link parameters from
the devicetree properties.

Signed-off-by: Lucas Stach <[email protected]>
  • Loading branch information
lynxeye-dev authored and saschahauer committed Feb 6, 2018
1 parent 5b92cfc commit f52e20e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions drivers/net/phy/phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,13 @@ static struct phy_device *of_phy_register_fixed_link(struct device_node *np,

phydev->dev.parent = &edev->dev;
phydev->registered = 1;
phydev->speed = 1000;
phydev->duplex = 1;
phydev->link = 1;

if (of_property_read_u32(np, "speed", &phydev->speed))
return NULL;
phydev->duplex = of_property_read_bool(np,"full-duplex");
phydev->pause = of_property_read_bool(np, "pause");
phydev->asym_pause = of_property_read_bool(np, "asym-pause");

return phydev;
}
Expand Down

0 comments on commit f52e20e

Please sign in to comment.