Thread (13 messages) flat view 13 messages, 5 authors, 2016-03-16

Re: [PATCHv3 (net.git) 2/2] stmmac: fix MDIO settings

From: Giuseppe CAVALLARO <hidden>
Date: 2016-03-14 09:28:45

On 3/14/2016 10:14 AM, Gabriel Fernandez wrote:
Hi Peppe,

Just one remark below
quoted
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index 6a52fa1..d2322e9 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
[snip]
quoted
+static bool stmmac_dt_phy(struct plat_stmmacenet_data *plat,
+                         struct device_node *np, struct device *dev)
+{
+       bool ret = true;
+
+       /* If phy-handle property is passed from DT, use it as the PHY */
+       plat->phy_node = of_parse_phandle(np, "phy-handle", 0);
+       if (plat->phy_node)
+               dev_dbg(dev, "Found phy-handle subnode\n");
+
+       /* If phy-handle is not specified, check if we have a fixed-phy */
+       if (!plat->phy_node && of_phy_is_fixed_link(np)) {
+               if ((of_phy_register_fixed_link(np) < 0))
+                       return -ENODEV;
+
stmmac_dt_phy() function should return a Boolean
Thx Gabriel, I will fix return value in V4.

peppe

Best Regards.

Gabriel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help