On Fri, Dec 18, 2015 at 05:30:54PM +0800, shh....@gmail.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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to