All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: net: dwmac: fix 'mac-mode' type
@ 2019-09-17 10:30 ` Alexandru Ardelean
  0 siblings, 0 replies; 9+ messages in thread
From: Alexandru Ardelean @ 2019-09-17 10:30 UTC (permalink / raw)
  To: netdev, devicetree, linux-kernel
  Cc: davem, robh+dt, peppe.cavallaro, alexandre.torgue, andrew,
	f.fainelli, Alexandru Ardelean

The 'mac-mode' property is similar to 'phy-mode' and 'phy-connection-type',
which are enums of mode strings.

The 'dwmac' driver supports almost all modes declared in the 'phy-mode'
enum (except for 1 or 2). But in general, there may be a case where
'mac-mode' becomes more generic and is moved as part of phylib or netdev.

In any case, the 'mac-mode' field should be made an enum, and it also makes
sense to just reference the 'phy-connection-type' from
'ethernet-controller.yaml'. That will also make it more future-proof for new
modes.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
---
 Documentation/devicetree/bindings/net/snps,dwmac.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
index ebe4537a7cce..4845e29411e4 100644
--- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
+++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
@@ -113,7 +113,7 @@ properties:
     const: stmmaceth
 
   mac-mode:
-    maxItems: 1
+    $ref: ethernet-controller.yaml#/properties/phy-connection-type
     description:
       The property is identical to 'phy-mode', and assumes that there is mode
       converter in-between the MAC & PHY (e.g. GMII-to-RGMII). This converter
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH] dt-bindings: net: dwmac: fix 'mac-mode' type
@ 2019-09-17 10:30 ` Alexandru Ardelean
  0 siblings, 0 replies; 9+ messages in thread
From: Alexandru Ardelean @ 2019-09-17 10:30 UTC (permalink / raw)
  To: netdev, devicetree, linux-kernel
  Cc: davem, robh+dt, peppe.cavallaro, alexandre.torgue, andrew,
	f.fainelli, Alexandru Ardelean

The 'mac-mode' property is similar to 'phy-mode' and 'phy-connection-type',
which are enums of mode strings.

The 'dwmac' driver supports almost all modes declared in the 'phy-mode'
enum (except for 1 or 2). But in general, there may be a case where
'mac-mode' becomes more generic and is moved as part of phylib or netdev.

In any case, the 'mac-mode' field should be made an enum, and it also makes
sense to just reference the 'phy-connection-type' from
'ethernet-controller.yaml'. That will also make it more future-proof for new
modes.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
---
 Documentation/devicetree/bindings/net/snps,dwmac.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
index ebe4537a7cce..4845e29411e4 100644
--- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
+++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
@@ -113,7 +113,7 @@ properties:
     const: stmmaceth
 
   mac-mode:
-    maxItems: 1
+    $ref: ethernet-controller.yaml#/properties/phy-connection-type
     description:
       The property is identical to 'phy-mode', and assumes that there is mode
       converter in-between the MAC & PHY (e.g. GMII-to-RGMII). This converter
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] dt-bindings: net: dwmac: fix 'mac-mode' type
  2019-09-17 10:30 ` Alexandru Ardelean
  (?)
@ 2019-09-17 12:41 ` Andrew Lunn
  2019-09-17 13:24   ` Ardelean, Alexandru
  -1 siblings, 1 reply; 9+ messages in thread
From: Andrew Lunn @ 2019-09-17 12:41 UTC (permalink / raw)
  To: Alexandru Ardelean
  Cc: netdev, devicetree, linux-kernel, davem, robh+dt,
	peppe.cavallaro, alexandre.torgue, f.fainelli

On Tue, Sep 17, 2019 at 01:30:52PM +0300, Alexandru Ardelean wrote:
> The 'mac-mode' property is similar to 'phy-mode' and 'phy-connection-type',
> which are enums of mode strings.
> 
> The 'dwmac' driver supports almost all modes declared in the 'phy-mode'
> enum (except for 1 or 2). But in general, there may be a case where
> 'mac-mode' becomes more generic and is moved as part of phylib or netdev.
> 
> In any case, the 'mac-mode' field should be made an enum, and it also makes
> sense to just reference the 'phy-connection-type' from
> 'ethernet-controller.yaml'. That will also make it more future-proof for new
> modes.
> 
> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>

Hi Alexandru

Adding a Fixes: tag would be good. Just reply in this thread, and
patchwork will do magic to append it to the patch.

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] dt-bindings: net: dwmac: fix 'mac-mode' type
  2019-09-17 12:41 ` Andrew Lunn
@ 2019-09-17 13:24   ` Ardelean, Alexandru
  0 siblings, 0 replies; 9+ messages in thread
From: Ardelean, Alexandru @ 2019-09-17 13:24 UTC (permalink / raw)
  To: andrew
  Cc: davem, alexandre.torgue, devicetree, linux-kernel,
	peppe.cavallaro, netdev, f.fainelli, robh+dt

On Tue, 2019-09-17 at 14:41 +0200, Andrew Lunn wrote:
> [External]
> 
> On Tue, Sep 17, 2019 at 01:30:52PM +0300, Alexandru Ardelean wrote:
> > The 'mac-mode' property is similar to 'phy-mode' and 'phy-connection-type',
> > which are enums of mode strings.
> > 
> > The 'dwmac' driver supports almost all modes declared in the 'phy-mode'
> > enum (except for 1 or 2). But in general, there may be a case where
> > 'mac-mode' becomes more generic and is moved as part of phylib or netdev.
> > 
> > In any case, the 'mac-mode' field should be made an enum, and it also makes
> > sense to just reference the 'phy-connection-type' from
> > 'ethernet-controller.yaml'. That will also make it more future-proof for new
> > modes.
> > 
> > Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
> 
> Hi Alexandru
> 
> Adding a Fixes: tag would be good. Just reply in this thread, and
> patchwork will do magic to append it to the patch.
> 

Oops. Good point.
Thanks for the tip.

Let's see if Rob agrees as well.

Fixes: 9c15d3597c62 ("dt-bindings: net: dwmac: document 'mac-mode' property")

> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
> 
>     Andrew

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] dt-bindings: net: dwmac: fix 'mac-mode' type
  2019-09-17 10:30 ` Alexandru Ardelean
  (?)
  (?)
@ 2019-09-17 13:53 ` Rob Herring
  -1 siblings, 0 replies; 9+ messages in thread
From: Rob Herring @ 2019-09-17 13:53 UTC (permalink / raw)
  To: Alexandru Ardelean
  Cc: netdev, devicetree, linux-kernel, David Miller,
	Giuseppe CAVALLARO, Alexandre Torgue, Andrew Lunn,
	Florian Fainelli

On Tue, Sep 17, 2019 at 2:31 AM Alexandru Ardelean
<alexandru.ardelean@analog.com> wrote:
>
> The 'mac-mode' property is similar to 'phy-mode' and 'phy-connection-type',
> which are enums of mode strings.
>
> The 'dwmac' driver supports almost all modes declared in the 'phy-mode'
> enum (except for 1 or 2). But in general, there may be a case where
> 'mac-mode' becomes more generic and is moved as part of phylib or netdev.
>
> In any case, the 'mac-mode' field should be made an enum, and it also makes
> sense to just reference the 'phy-connection-type' from
> 'ethernet-controller.yaml'. That will also make it more future-proof for new
> modes.
>
> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
> ---
>  Documentation/devicetree/bindings/net/snps,dwmac.yaml | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] dt-bindings: net: dwmac: fix 'mac-mode' type
  2019-09-17 10:30 ` Alexandru Ardelean
@ 2019-09-21  1:11   ` Jakub Kicinski
  -1 siblings, 0 replies; 9+ messages in thread
From: Jakub Kicinski @ 2019-09-21  1:11 UTC (permalink / raw)
  To: Alexandru Ardelean
  Cc: netdev, devicetree, linux-kernel, davem, robh+dt,
	peppe.cavallaro, alexandre.torgue, andrew, f.fainelli

On Tue, 17 Sep 2019 13:30:52 +0300, Alexandru Ardelean wrote:
> The 'mac-mode' property is similar to 'phy-mode' and 'phy-connection-type',
> which are enums of mode strings.
> 
> The 'dwmac' driver supports almost all modes declared in the 'phy-mode'
> enum (except for 1 or 2). But in general, there may be a case where
> 'mac-mode' becomes more generic and is moved as part of phylib or netdev.
> 
> In any case, the 'mac-mode' field should be made an enum, and it also makes
> sense to just reference the 'phy-connection-type' from
> 'ethernet-controller.yaml'. That will also make it more future-proof for new
> modes.
> 
> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>

Applied, thank you!

FWIW I had to add the Fixes tag by hand, either ozlabs patchwork or my
git-pw doesn't have the automagic handling there, yet.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] dt-bindings: net: dwmac: fix 'mac-mode' type
@ 2019-09-21  1:11   ` Jakub Kicinski
  0 siblings, 0 replies; 9+ messages in thread
From: Jakub Kicinski @ 2019-09-21  1:11 UTC (permalink / raw)
  To: Alexandru Ardelean
  Cc: netdev, devicetree, linux-kernel, davem, robh+dt,
	peppe.cavallaro, alexandre.torgue, andrew, f.fainelli

On Tue, 17 Sep 2019 13:30:52 +0300, Alexandru Ardelean wrote:
> The 'mac-mode' property is similar to 'phy-mode' and 'phy-connection-type',
> which are enums of mode strings.
> 
> The 'dwmac' driver supports almost all modes declared in the 'phy-mode'
> enum (except for 1 or 2). But in general, there may be a case where
> 'mac-mode' becomes more generic and is moved as part of phylib or netdev.
> 
> In any case, the 'mac-mode' field should be made an enum, and it also makes
> sense to just reference the 'phy-connection-type' from
> 'ethernet-controller.yaml'. That will also make it more future-proof for new
> modes.
> 
> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>

Applied, thank you!

FWIW I had to add the Fixes tag by hand, either ozlabs patchwork or my
git-pw doesn't have the automagic handling there, yet.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] dt-bindings: net: dwmac: fix 'mac-mode' type
  2019-09-21  1:11   ` Jakub Kicinski
  (?)
@ 2019-09-21  3:02   ` Florian Fainelli
  2019-09-21 18:46     ` Jakub Kicinski
  -1 siblings, 1 reply; 9+ messages in thread
From: Florian Fainelli @ 2019-09-21  3:02 UTC (permalink / raw)
  To: Jakub Kicinski, Alexandru Ardelean
  Cc: netdev, devicetree, linux-kernel, davem, robh+dt,
	peppe.cavallaro, alexandre.torgue, andrew



On 9/20/2019 6:11 PM, Jakub Kicinski wrote:
> On Tue, 17 Sep 2019 13:30:52 +0300, Alexandru Ardelean wrote:
>> The 'mac-mode' property is similar to 'phy-mode' and 'phy-connection-type',
>> which are enums of mode strings.
>>
>> The 'dwmac' driver supports almost all modes declared in the 'phy-mode'
>> enum (except for 1 or 2). But in general, there may be a case where
>> 'mac-mode' becomes more generic and is moved as part of phylib or netdev.
>>
>> In any case, the 'mac-mode' field should be made an enum, and it also makes
>> sense to just reference the 'phy-connection-type' from
>> 'ethernet-controller.yaml'. That will also make it more future-proof for new
>> modes.
>>
>> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
> 
> Applied, thank you!
> 
> FWIW I had to add the Fixes tag by hand, either ozlabs patchwork or my
> git-pw doesn't have the automagic handling there, yet.

AFAICT the ozlabs patchwork instance does not do it, but if you have
patchwork administrative rights (the jango administration panel I mean)
then it is simple to add the regular expression to the list of tags that
patchwork already recognized. Had tried getting that included by
default, but it also counted all of those tags and therefore was not
particularly fine grained:

https://lists.ozlabs.org/pipermail/patchwork/2017-January/003910.html
-- 
Florian

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] dt-bindings: net: dwmac: fix 'mac-mode' type
  2019-09-21  3:02   ` Florian Fainelli
@ 2019-09-21 18:46     ` Jakub Kicinski
  0 siblings, 0 replies; 9+ messages in thread
From: Jakub Kicinski @ 2019-09-21 18:46 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: Alexandru Ardelean, netdev, devicetree, linux-kernel, davem,
	robh+dt, peppe.cavallaro, alexandre.torgue, andrew

On Fri, 20 Sep 2019 20:02:58 -0700, Florian Fainelli wrote:
> On 9/20/2019 6:11 PM, Jakub Kicinski wrote:
> > On Tue, 17 Sep 2019 13:30:52 +0300, Alexandru Ardelean wrote:  
> >> The 'mac-mode' property is similar to 'phy-mode' and 'phy-connection-type',
> >> which are enums of mode strings.
> >>
> >> The 'dwmac' driver supports almost all modes declared in the 'phy-mode'
> >> enum (except for 1 or 2). But in general, there may be a case where
> >> 'mac-mode' becomes more generic and is moved as part of phylib or netdev.
> >>
> >> In any case, the 'mac-mode' field should be made an enum, and it also makes
> >> sense to just reference the 'phy-connection-type' from
> >> 'ethernet-controller.yaml'. That will also make it more future-proof for new
> >> modes.
> >>
> >> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>  
> > 
> > Applied, thank you!
> > 
> > FWIW I had to add the Fixes tag by hand, either ozlabs patchwork or my
> > git-pw doesn't have the automagic handling there, yet.  
> 
> AFAICT the ozlabs patchwork instance does not do it, but if you have
> patchwork administrative rights (the jango administration panel I mean)
> then it is simple to add the regular expression to the list of tags that
> patchwork already recognized. Had tried getting that included by
> default, but it also counted all of those tags and therefore was not
> particularly fine grained:
> 
> https://lists.ozlabs.org/pipermail/patchwork/2017-January/003910.html

Curious, it did seem to have counted the Fixes in the 'F' field on the
web UI but git-pw didn't pull it down 🤔

linux$ git checkout 92974a1d006ad8b30d53047c70974c9e065eb7df
Note: checking out '92974a1d006ad8b30d53047c70974c9e065eb7df'.
[...]
linux$ git pw patch apply 1163199 --signoff
11:41 linux$ git show
commit ac964661384b93ff3c9839c6d56f293195d54b4e (HEAD)
Author: Alexandru Ardelean <alexandru.ardelean@analog.com>
Date:   Tue Sep 17 13:30:52 2019 +0300

    dt-bindings: net: dwmac: fix 'mac-mode' type
    
    The 'mac-mode' property is similar to 'phy-mode' and 'phy-connection-type',
    which are enums of mode strings.
    
    The 'dwmac' driver supports almost all modes declared in the 'phy-mode'
    enum (except for 1 or 2). But in general, there may be a case where
    'mac-mode' becomes more generic and is moved as part of phylib or netdev.
    
    In any case, the 'mac-mode' field should be made an enum, and it also makes
    sense to just reference the 'phy-connection-type' from
    'ethernet-controller.yaml'. That will also make it more future-proof for new
    modes.
    
    Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
    Reviewed-by: Andrew Lunn <andrew@lunn.ch>
    Reviewed-by: Rob Herring <robh@kernel.org>
    Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>

11:41 linux$ 

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-09-21 18:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-17 10:30 [PATCH] dt-bindings: net: dwmac: fix 'mac-mode' type Alexandru Ardelean
2019-09-17 10:30 ` Alexandru Ardelean
2019-09-17 12:41 ` Andrew Lunn
2019-09-17 13:24   ` Ardelean, Alexandru
2019-09-17 13:53 ` Rob Herring
2019-09-21  1:11 ` Jakub Kicinski
2019-09-21  1:11   ` Jakub Kicinski
2019-09-21  3:02   ` Florian Fainelli
2019-09-21 18:46     ` Jakub Kicinski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.