[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151218120209.GA477@lunn.ch>
Date: Fri, 18 Dec 2015 13:02:09 +0100
From: Andrew Lunn <andrew@...n.ch>
To: shh.xie@...il.com
Cc: netdev@...r.kernel.org, davem@...emloft.net, f.fainelli@...il.com,
Shaohui Xie <Shaohui.Xie@...escale.com>
Subject: Re: [PATCH] net: phy: adds backplane driver for Freescale's PCS PHY
On Fri, Dec 18, 2015 at 05:30:54PM +0800, shh.xie@...il.com wrote:
> +static int fsl_backplane_probe(struct phy_device *phydev)
> +{
> + struct fsl_xgkr_inst *xgkr_inst;
> + struct device_node *child, *parent, *lane_node;
> + const char *lane_name;
> + int len;
> + int ret;
> + u32 mode;
> + u32 lane[2];
> +
> + child = phydev->dev.of_node;
> + parent = of_get_parent(child);
> + if (!parent) {
> + dev_err(&phydev->dev, "could not get parent node");
> + return 0;
> + }
> +
> + lane_name = of_get_property(parent, "lane-instance", &len);
> + if (!lane_name)
> + return 0;
> +
> + if (strstr(lane_name, "1000BASE-KX"))
> + mode = BACKPLANE_1G_KX;
> + else
> + mode = BACKPLANE_10G_KR;
> +
> + lane_node = of_parse_phandle(child, "lane-handle", 0);
Hi Shaohui
You are missing the device tree binding Documentation.
Parent will be the mdio bus device and you want 'lane-instance' and
'lane-handle' properties to be in the mdio bus node?
Andrew
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists