From: Andrew Lunn <andrew@lunn.ch>
To: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Cc: netdev@vger.kernel.org, vivien.didelot@gmail.com,
f.fainelli@gmail.com, olteanv@gmail.com, davem@davemloft.net,
kuba@kernel.org
Subject: Re: [PATCH net-next v2] net: dsa: OF-ware slave_mii_bus
Date: Fri, 18 Feb 2022 10:28:07 +0100 [thread overview]
Message-ID: <Yg9mpxc9Var4xJLq@lunn.ch> (raw)
In-Reply-To: <20220218062147.7672-1-luizluca@gmail.com>
On Fri, Feb 18, 2022 at 03:21:47AM -0300, Luiz Angelo Daros de Luca wrote:
> If found, register the DSA internally allocated slave_mii_bus with an OF
> "mdio" child object. It can save some drivers from creating their
> custom internal MDIO bus.
> @@ -924,7 +926,10 @@ static int dsa_switch_setup(struct dsa_switch *ds)
>
> dsa_slave_mii_bus_init(ds);
>
> - err = mdiobus_register(ds->slave_mii_bus);
> + dn = of_get_child_by_name(ds->dev->of_node, "mdio");
> +
> + err = of_mdiobus_register(ds->slave_mii_bus, dn);
> + of_node_put(dn);
This makes sense, but please update the binding document to include this:
Documentation/devicetree/bindings/net/dsa/dsa.yaml
Andrew
prev parent reply other threads:[~2022-02-18 9:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-18 6:21 [PATCH net-next v2] net: dsa: OF-ware slave_mii_bus Luiz Angelo Daros de Luca
2022-02-18 9:28 ` Andrew Lunn [this message]
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=Yg9mpxc9Var4xJLq@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=luizluca@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=vivien.didelot@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).