From: Vladimir Oltean <olteanv@gmail.com>
To: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Cc: "Alvin Šipraga" <ALSI@bang-olufsen.dk>,
"Krzysztof Kozlowski" <krzk@kernel.org>,
"linus.walleij@linaro.org" <linus.walleij@linaro.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"andrew@lunn.ch" <andrew@lunn.ch>,
"f.fainelli@gmail.com" <f.fainelli@gmail.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"edumazet@google.com" <edumazet@google.com>,
"kuba@kernel.org" <kuba@kernel.org>,
"pabeni@redhat.com" <pabeni@redhat.com>,
"arinc.unal@arinc9.com" <arinc.unal@arinc9.com>
Subject: Re: [net-next 2/2] net: dsa: realtek: load switch variants on demand
Date: Thu, 7 Dec 2023 19:19:41 +0200 [thread overview]
Message-ID: <20231207171941.dhgch5fs6mmke7v7@skbuf> (raw)
In-Reply-To: <CAJq09z4ZdB9L7ksuN0b+N-LCv+zOvM+5Q9iWXccGN3w54EN1_Q@mail.gmail.com>
On Mon, Nov 27, 2023 at 07:24:16PM -0300, Luiz Angelo Daros de Luca wrote:
> The "realtek_smi_setup_mdio()" used in setup_interface isn't really
> necessary (like it happens in realtek-mdio). It could be used (or not)
> by both interfaces. The "realtek,smi-mdio" compatible string is
> misleading, indicating it might be something specific to the SMI
> interface HW while it is just how the driver was implemented. A
> "realtek,slave_mdio" or "realtek,user_mii" would be better.
The compatible string is about picking a driver for a device. It is
supposed to uniquely describe the register layout and functionality of
that IP block, not its functional role in the kernel. "slave_mdio" and
"user_mii" are too ingrained with "this MDIO controller gives access to
internal PHY ports of DSA slave ports".
Even if the MDIO controller doesn't currently have its own struct device
and driver, you'd have to think of the fact that it could, when picking
an appropriate compatible string.
If you have very specific information that the MDIO controller is based on
some reusable/licensable IP block and there were no modifications made
to it, you could use that compatible string.
Otherwise, another sensible choice would be "realtek,<precise-soc-name>-mdio",
because it leaves room for future extensions with other compatible
strings, more generic or just as specific, that all bind to the same
driver.
It's always good to start being too specific rather than too generic,
because a future Realtek switch might have a different IP block for its
MDIO controller. Then a driver for your existing "realtek,smi-mdio" or
"realtek,slave_mdio" or "realtek,user_mii" compatible string sounds like
it could handle it, but it can't.
You can always add secondary compatible strings to a node, but changing
the existing one breaks the ABI between the kernel and the DT.
next prev parent reply other threads:[~2023-12-07 17:19 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-17 23:49 [net-next 0/2] net: dsa: realtek: Introduce realtek_common, load variants on demand Luiz Angelo Daros de Luca
2023-11-17 23:50 ` [net-next 1/2] net: dsa: realtek: create realtek-common Luiz Angelo Daros de Luca
2023-11-19 12:13 ` Vladimir Oltean
2023-11-19 12:20 ` Vladimir Oltean
2023-11-17 23:50 ` [net-next 2/2] net: dsa: realtek: load switch variants on demand Luiz Angelo Daros de Luca
2023-11-19 12:19 ` Vladimir Oltean
2023-11-20 9:20 ` Krzysztof Kozlowski
2023-11-20 13:48 ` Vladimir Oltean
2023-11-20 14:07 ` Krzysztof Kozlowski
2023-11-21 14:40 ` Luiz Angelo Daros de Luca
2023-11-21 22:15 ` Krzysztof Kozlowski
2023-11-21 22:35 ` Krzysztof Kozlowski
2023-11-22 22:44 ` Luiz Angelo Daros de Luca
2023-11-23 2:05 ` Alvin Šipraga
2023-11-27 22:24 ` Luiz Angelo Daros de Luca
2023-12-07 17:02 ` Vladimir Oltean
2023-12-07 20:22 ` Luiz Angelo Daros de Luca
2023-12-07 17:19 ` Vladimir Oltean [this message]
2023-12-07 19:50 ` Luiz Angelo Daros de Luca
2023-12-07 22:31 ` Vladimir Oltean
2023-12-08 2:46 ` Luiz Angelo Daros de Luca
2023-12-11 18:01 ` Vladimir Oltean
2023-11-25 7:10 ` Dan Carpenter
2023-11-17 23:57 ` [net-next 0/2] net: dsa: realtek: Introduce realtek_common, load " Luiz Angelo Daros de Luca
2023-11-18 0:44 ` Jakub Kicinski
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=20231207171941.dhgch5fs6mmke7v7@skbuf \
--to=olteanv@gmail.com \
--cc=ALSI@bang-olufsen.dk \
--cc=andrew@lunn.ch \
--cc=arinc.unal@arinc9.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=krzk@kernel.org \
--cc=kuba@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=luizluca@gmail.com \
--cc=netdev@vger.kernel.org \
--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