devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Cc: devicetree@vger.kernel.org,
	Grant Likely <grant.likely@linaro.org>,
	Rob Herring <rob.herring@calxeda.com>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH RFC] net: of_mdio: Scan PHYs which have device_type set to ethernet-phy
Date: Wed, 11 Dec 2013 07:15:54 +0000	[thread overview]
Message-ID: <1695129.4QIGmmVPkX@lenovo> (raw)
In-Reply-To: <1384441556-20674-1-git-send-email-srinivas.kandagatla@st.com>

Le jeudi 14 novembre 2013, 15:05:56 Srinivas Kandagatla a écrit :
> According to Documentation/devicetree/bindings/net/phy.txt device_type
> property of PHY nodes is mandatory, which should be set to
> "ethernet-phy". This patch adds check in scanning phys and only scans
> node which have device-type set to "ethernet-phy".

Please CC netdev@vger.kernel.org as there might be networking folks not 
actively following devicetree-discuss.

> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
> ---
>  drivers/of/of_mdio.c |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c
> index d5a57a9..78c53c7 100644
> --- a/drivers/of/of_mdio.c
> +++ b/drivers/of/of_mdio.c
> @@ -57,6 +57,9 @@ int of_mdiobus_register(struct mii_bus *mdio, struct
> device_node *np)
> 
>  	/* Loop over the child nodes and register a phy_device for each one */
>  	for_each_available_child_of_node(np, child) {
> +		/* A PHY must have device_type set to "ethernet-phy" */
> +		if (of_node_cmp(child->type, "ethernet-phy"))
> +			continue;

As already stated by Grant this will break quite a lot of platforms out there. 
Technically speaking, ePAPR v1.1 only specifies that "cpu" and "memory" nodes 
should have a "device_type" property for compatibility. Altough I do agree 
that it is nice to have a properly set "device_type", we can't always rely on 
that. 
-- 
Florian

  parent reply	other threads:[~2013-12-11  7:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-14 15:05 [PATCH RFC] net: of_mdio: Scan PHYs which have device_type set to ethernet-phy Srinivas Kandagatla
     [not found] ` <1384441556-20674-1-git-send-email-srinivas.kandagatla-qxv4g6HH51o@public.gmane.org>
2013-11-15  1:35   ` Grant Likely
2013-12-11  7:15 ` Florian Fainelli [this message]
2013-12-11  9:15   ` Grant Likely

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=1695129.4QIGmmVPkX@lenovo \
    --to=f.fainelli@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=grant.likely@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rob.herring@calxeda.com \
    --cc=srinivas.kandagatla@st.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).