From: Luiz Angelo Daros de Luca <luizluca@gmail.com>
To: "Linus Walleij" <linus.walleij@linaro.org>,
"Alvin Šipraga" <alsi@bang-olufsen.dk>,
"Andrew Lunn" <andrew@lunn.ch>,
"Florian Fainelli" <f.fainelli@gmail.com>,
"Vladimir Oltean" <olteanv@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Russell King" <linux@armlinux.org.uk>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Luiz Angelo Daros de Luca <luizluca@gmail.com>,
Florian Fainelli <florian.fainelli@broadcom.com>
Subject: [PATCH net-next v5 07/11] net: dsa: realtek: get internal MDIO node by name
Date: Tue, 30 Jan 2024 20:13:26 -0300 [thread overview]
Message-ID: <20240130-realtek_reverse-v5-7-ecafd9283a07@gmail.com> (raw)
In-Reply-To: <20240130-realtek_reverse-v5-0-ecafd9283a07@gmail.com>
The binding docs requires for SMI-connected devices that the switch
must have a child node named "mdio" and with a compatible string of
"realtek,smi-mdio". Meanwile, for MDIO-connected switches, the binding
docs only requires a child node named "mdio".
This patch changes the driver to use the common denominator for both
interfaces, looking for the MDIO node by name, ignoring the compatible
string.
Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
drivers/net/dsa/realtek/realtek-smi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/dsa/realtek/realtek-smi.c b/drivers/net/dsa/realtek/realtek-smi.c
index 67bdad7ac910..ad47dcbbd2b2 100644
--- a/drivers/net/dsa/realtek/realtek-smi.c
+++ b/drivers/net/dsa/realtek/realtek-smi.c
@@ -333,7 +333,7 @@ static int realtek_smi_setup_mdio(struct dsa_switch *ds)
struct device_node *mdio_np;
int ret;
- mdio_np = of_get_compatible_child(priv->dev->of_node, "realtek,smi-mdio");
+ mdio_np = of_get_child_by_name(priv->dev->of_node, "mdio");
if (!mdio_np) {
dev_err(priv->dev, "no MDIO bus node\n");
return -ENODEV;
--
2.43.0
next prev parent reply other threads:[~2024-01-30 23:14 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-30 23:13 [PATCH net-next v5 00/11] net: dsa: realtek: variants to drivers, interfaces to a common module Luiz Angelo Daros de Luca
2024-01-30 23:13 ` [PATCH net-next v5 01/11] net: dsa: realtek: drop cleanup from realtek_ops Luiz Angelo Daros de Luca
2024-02-01 0:40 ` Vladimir Oltean
2024-01-30 23:13 ` [PATCH net-next v5 02/11] net: dsa: realtek: introduce REALTEK_DSA namespace Luiz Angelo Daros de Luca
2024-01-30 23:13 ` [PATCH net-next v5 03/11] net: dsa: realtek: convert variants into real drivers Luiz Angelo Daros de Luca
2024-02-01 11:30 ` Vladimir Oltean
2024-01-30 23:13 ` [PATCH net-next v5 04/11] net: dsa: realtek: keep variant reference in realtek_priv Luiz Angelo Daros de Luca
2024-01-30 23:13 ` [PATCH net-next v5 05/11] net: dsa: realtek: common rtl83xx module Luiz Angelo Daros de Luca
2024-02-01 18:23 ` Vladimir Oltean
2024-01-30 23:13 ` [PATCH net-next v5 06/11] net: dsa: realtek: merge rtl83xx and interface modules into realtek-dsa Luiz Angelo Daros de Luca
2024-01-30 23:13 ` Luiz Angelo Daros de Luca [this message]
2024-01-30 23:13 ` [PATCH net-next v5 08/11] net: dsa: realtek: clean user_mii_bus setup Luiz Angelo Daros de Luca
2024-02-01 22:33 ` Vladimir Oltean
2024-01-30 23:13 ` [PATCH net-next v5 09/11] net: dsa: realtek: migrate user_mii_bus setup to realtek-dsa Luiz Angelo Daros de Luca
2024-02-01 22:45 ` Vladimir Oltean
2024-02-05 22:43 ` Luiz Angelo Daros de Luca
2024-01-30 23:13 ` [PATCH net-next v5 10/11] net: dsa: realtek: use the same mii bus driver for both interfaces Luiz Angelo Daros de Luca
2024-02-01 22:48 ` Vladimir Oltean
2024-01-30 23:13 ` [PATCH net-next v5 11/11] net: dsa: realtek: embed dsa_switch into realtek_priv Luiz Angelo Daros de Luca
2024-02-01 22:58 ` Vladimir Oltean
2024-02-05 21:49 ` Luiz Angelo Daros de Luca
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=20240130-realtek_reverse-v5-7-ecafd9283a07@gmail.com \
--to=luizluca@gmail.com \
--cc=alsi@bang-olufsen.dk \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=florian.fainelli@broadcom.com \
--cc=kuba@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.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).