diff mbox series

[net-next,01/13] dt-bindings: net: dsa: realtek-smi: remove unsupported switches

Message ID 20211216201342.25587-2-luizluca@gmail.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series net: dsa: realtek: MDIO interface and RTL8367S | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Series has a cover letter
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers warning 4 maintainers not CCed: robh+dt@kernel.org devicetree@vger.kernel.org kuba@kernel.org davem@davemloft.net
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 22 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Luiz Angelo Daros de Luca Dec. 16, 2021, 8:13 p.m. UTC
From: Luiz Angelo Daros de Luca <luizluca@gmail.com>

Remove some switch models that are not cited in the code. Although rtl8366s
was kept, it looks like a stub driver (with a FIXME comment).

Reviewed-by: Arınç ÜNAL <arinc.unal@arinc9.com>
Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
---
 .../devicetree/bindings/net/dsa/realtek-smi.txt          | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

Comments

Alvin Šipraga Dec. 16, 2021, 11:20 p.m. UTC | #1
On 12/16/21 21:13, luizluca@gmail.com wrote:
> From: Luiz Angelo Daros de Luca <luizluca@gmail.com>
> 
> Remove some switch models that are not cited in the code. Although rtl8366s
> was kept, it looks like a stub driver (with a FIXME comment).

Reviewed-by: Alvin Šipraga <alsi@bang-olufsen.dk>

> 
> Reviewed-by: Arınç ÜNAL <arinc.unal@arinc9.com>
> Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
> ---
>   .../devicetree/bindings/net/dsa/realtek-smi.txt          | 9 ++-------
>   1 file changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/net/dsa/realtek-smi.txt b/Documentation/devicetree/bindings/net/dsa/realtek-smi.txt
> index 7959ec237983..3a60e77ceed4 100644
> --- a/Documentation/devicetree/bindings/net/dsa/realtek-smi.txt
> +++ b/Documentation/devicetree/bindings/net/dsa/realtek-smi.txt
> @@ -4,20 +4,15 @@ Realtek SMI-based Switches
>   The SMI "Simple Management Interface" is a two-wire protocol using
>   bit-banged GPIO that while it reuses the MDIO lines MCK and MDIO does
>   not use the MDIO protocol. This binding defines how to specify the
> -SMI-based Realtek devices.
> +SMI-based Realtek devices. The realtek-smi driver is a platform driver
> +and it must be inserted inside a platform node.
>   
>   Required properties:
>   
>   - compatible: must be exactly one of:
>         "realtek,rtl8365mb" (4+1 ports)
> -      "realtek,rtl8366"
>         "realtek,rtl8366rb" (4+1 ports)
>         "realtek,rtl8366s"  (4+1 ports)
> -      "realtek,rtl8367"
> -      "realtek,rtl8367b"
> -      "realtek,rtl8368s"  (8 port)
> -      "realtek,rtl8369"
> -      "realtek,rtl8370"   (8 port)
>   
>   Required properties:
>   - mdc-gpios: GPIO line for the MDC clock line.
Linus Walleij Dec. 18, 2021, 2:41 a.m. UTC | #2
On Thu, Dec 16, 2021 at 9:14 PM <luizluca@gmail.com> wrote:

> From: Luiz Angelo Daros de Luca <luizluca@gmail.com>
>
> Remove some switch models that are not cited in the code. Although rtl8366s
> was kept, it looks like a stub driver (with a FIXME comment).
>
> Reviewed-by: Arınç ÜNAL <arinc.unal@arinc9.com>
> Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>

Why? The device tree bindings are done with the ambition to be used
on several operating systems and the fact that the code in the Linux
kernel is not using them or citing them is not a reason to remove them.
We often define bindings for devices which don't even have a driver
in Linux.

A reason to delete them would be if they are family names and not
product names, i.e. no devices have this printed on the package.
I have seen physical packages saying "RTL8366RB" and
"RTL8366S" for sure, the rest I don't know about...

So we need compatibles for each physically existing component
that people might want to put in their device tree. Whether they have
drivers or not.

Yours,
Linus Walleij
Luiz Angelo Daros de Luca Dec. 18, 2021, 6:12 a.m. UTC | #3
>
> On Thu, Dec 16, 2021 at 9:14 PM <luizluca@gmail.com> wrote:
>
> > From: Luiz Angelo Daros de Luca <luizluca@gmail.com>
> >
> > Remove some switch models that are not cited in the code. Although rtl8366s
> > was kept, it looks like a stub driver (with a FIXME comment).
> >
> > Reviewed-by: Arınç ÜNAL <arinc.unal@arinc9.com>
> > Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
>
> Why? The device tree bindings are done with the ambition to be used
> on several operating systems and the fact that the code in the Linux
> kernel is not using them or citing them is not a reason to remove them.
> We often define bindings for devices which don't even have a driver
> in Linux.
>
> A reason to delete them would be if they are family names and not
> product names, i.e. no devices have this printed on the package.
> I have seen physical packages saying "RTL8366RB" and
> "RTL8366S" for sure, the rest I don't know about...
>
> So we need compatibles for each physically existing component
> that people might want to put in their device tree. Whether they have
> drivers or not.

Thanks Linus,

However, it also gives the users a false expectative that it is
supported (it has happened to me a couple of times). I would not like
to simply drop this. How about adding a "(not supported)" comment.
Would it be acceptable?
Linus Walleij Dec. 19, 2021, 10:27 p.m. UTC | #4
On Sat, Dec 18, 2021 at 7:12 AM Luiz Angelo Daros de Luca
<luizluca@gmail.com> wrote:

> However, it also gives the users a false expectative that it is
> supported (it has happened to me a couple of times). I would not like
> to simply drop this. How about adding a "(not supported)" comment.
> Would it be acceptable?

I don't see why users would get that idea. If they do not know
the difference between device tree bindings and operating system
implementations, I don't know how to fix that. Probably they simply
have to ask and get the answer like with any other technical
detail.

Yours,
Linus Walleij
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/dsa/realtek-smi.txt b/Documentation/devicetree/bindings/net/dsa/realtek-smi.txt
index 7959ec237983..3a60e77ceed4 100644
--- a/Documentation/devicetree/bindings/net/dsa/realtek-smi.txt
+++ b/Documentation/devicetree/bindings/net/dsa/realtek-smi.txt
@@ -4,20 +4,15 @@  Realtek SMI-based Switches
 The SMI "Simple Management Interface" is a two-wire protocol using
 bit-banged GPIO that while it reuses the MDIO lines MCK and MDIO does
 not use the MDIO protocol. This binding defines how to specify the
-SMI-based Realtek devices.
+SMI-based Realtek devices. The realtek-smi driver is a platform driver
+and it must be inserted inside a platform node.
 
 Required properties:
 
 - compatible: must be exactly one of:
       "realtek,rtl8365mb" (4+1 ports)
-      "realtek,rtl8366"
       "realtek,rtl8366rb" (4+1 ports)
       "realtek,rtl8366s"  (4+1 ports)
-      "realtek,rtl8367"
-      "realtek,rtl8367b"
-      "realtek,rtl8368s"  (8 port)
-      "realtek,rtl8369"
-      "realtek,rtl8370"   (8 port)
 
 Required properties:
 - mdc-gpios: GPIO line for the MDC clock line.