From: Andrew Lunn <andrew@lunn.ch>
To: shh.xie@gmail.com
Cc: netdev@vger.kernel.org, davem@davemloft.net,
f.fainelli@gmail.com, Shaohui Xie <Shaohui.Xie@freescale.com>
Subject: Re: [PATCH] net: phy: adds backplane driver for Freescale's PCS PHY
Date: Fri, 18 Dec 2015 13:02:09 +0100 [thread overview]
Message-ID: <20151218120209.GA477@lunn.ch> (raw)
In-Reply-To: <1450431054-5227-1-git-send-email-shh.xie@gmail.com>
On Fri, Dec 18, 2015 at 05:30:54PM +0800, shh.xie@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
next prev parent reply other threads:[~2015-12-18 12:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-18 9:30 [PATCH] net: phy: adds backplane driver for Freescale's PCS PHY shh.xie
2015-12-18 11:32 ` kbuild test robot
2015-12-18 12:02 ` Andrew Lunn [this message]
2015-12-21 12:17 ` Shaohui Xie
2015-12-22 10:43 ` Andrew Lunn
2015-12-22 12:33 ` Shaohui Xie
2015-12-29 3:54 ` Florian Fainelli
2015-12-29 8:18 ` Shaohui Xie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151218120209.GA477@lunn.ch \
--to=andrew@lunn.ch \
--cc=Shaohui.Xie@freescale.com \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=shh.xie@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).