diff mbox series

[net-next] dt-bindings: net: realtek,rtl82xx: Document RTL8211F LED support

Message ID 20240705215207.256863-1-marex@denx.de (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series [net-next] dt-bindings: net: realtek,rtl82xx: Document RTL8211F LED support | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 8 this patch: 8
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 11 of 11 maintainers
netdev/build_clang success Errors and warnings before: 8 this patch: 8
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 8 this patch: 8
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 26 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-07-08--15-00 (tests: 694)

Commit Message

Marek Vasut July 5, 2024, 9:51 p.m. UTC
The RTL8211F PHY does support LED configuration, document support
for LEDs in the binding document.

Signed-off-by: Marek Vasut <marex@denx.de>
---
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Conor Dooley <conor+dt@kernel.org>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Heiner Kallweit <hkallweit1@gmail.com>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Krzysztof Kozlowski <krzk+dt@kernel.org>
Cc: Paolo Abeni <pabeni@redhat.com>
Cc: Rob Herring <robh@kernel.org>
Cc: devicetree@vger.kernel.org
Cc: netdev@vger.kernel.org
---
 .../devicetree/bindings/net/realtek,rtl82xx.yaml   | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

Comments

Rob Herring July 8, 2024, 8:58 p.m. UTC | #1
On Fri, Jul 05, 2024 at 11:51:46PM +0200, Marek Vasut wrote:
> The RTL8211F PHY does support LED configuration, document support
> for LEDs in the binding document.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> ---
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Andrew Lunn <andrew@lunn.ch>
> Cc: Conor Dooley <conor+dt@kernel.org>
> Cc: Eric Dumazet <edumazet@google.com>
> Cc: Florian Fainelli <f.fainelli@gmail.com>
> Cc: Heiner Kallweit <hkallweit1@gmail.com>
> Cc: Jakub Kicinski <kuba@kernel.org>
> Cc: Krzysztof Kozlowski <krzk+dt@kernel.org>
> Cc: Paolo Abeni <pabeni@redhat.com>
> Cc: Rob Herring <robh@kernel.org>
> Cc: devicetree@vger.kernel.org
> Cc: netdev@vger.kernel.org
> ---
>  .../devicetree/bindings/net/realtek,rtl82xx.yaml   | 14 +++++++++++---
>  1 file changed, 11 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml b/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml
> index 18ee72f5c74a8..28c048368073b 100644
> --- a/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml
> +++ b/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml
> @@ -14,9 +14,6 @@ maintainers:
>  description:
>    Bindings for Realtek RTL82xx PHYs
>  
> -allOf:
> -  - $ref: ethernet-phy.yaml#
> -
>  properties:
>    compatible:
>      enum:
> @@ -54,6 +51,17 @@ properties:
>  
>  unevaluatedProperties: false
>  
> +allOf:
> +  - $ref: ethernet-phy.yaml#
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            const: ethernet-phy-id001c.c916
> +    then:
> +      properties:
> +        leds: true

This has no effect. 'leds' node is already allowed with the ref to 
ethernet-phy.yaml. I suppose you could negate the if and then, but I'm 
not really that worried if someone defines LEDs for a device with no 
LEDs. 

Rob
Marek Vasut July 8, 2024, 9:01 p.m. UTC | #2
On 7/8/24 10:58 PM, Rob Herring wrote:
> On Fri, Jul 05, 2024 at 11:51:46PM +0200, Marek Vasut wrote:
>> The RTL8211F PHY does support LED configuration, document support
>> for LEDs in the binding document.
>>
>> Signed-off-by: Marek Vasut <marex@denx.de>
>> ---
>> Cc: "David S. Miller" <davem@davemloft.net>
>> Cc: Andrew Lunn <andrew@lunn.ch>
>> Cc: Conor Dooley <conor+dt@kernel.org>
>> Cc: Eric Dumazet <edumazet@google.com>
>> Cc: Florian Fainelli <f.fainelli@gmail.com>
>> Cc: Heiner Kallweit <hkallweit1@gmail.com>
>> Cc: Jakub Kicinski <kuba@kernel.org>
>> Cc: Krzysztof Kozlowski <krzk+dt@kernel.org>
>> Cc: Paolo Abeni <pabeni@redhat.com>
>> Cc: Rob Herring <robh@kernel.org>
>> Cc: devicetree@vger.kernel.org
>> Cc: netdev@vger.kernel.org
>> ---
>>   .../devicetree/bindings/net/realtek,rtl82xx.yaml   | 14 +++++++++++---
>>   1 file changed, 11 insertions(+), 3 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml b/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml
>> index 18ee72f5c74a8..28c048368073b 100644
>> --- a/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml
>> +++ b/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml
>> @@ -14,9 +14,6 @@ maintainers:
>>   description:
>>     Bindings for Realtek RTL82xx PHYs
>>   
>> -allOf:
>> -  - $ref: ethernet-phy.yaml#
>> -
>>   properties:
>>     compatible:
>>       enum:
>> @@ -54,6 +51,17 @@ properties:
>>   
>>   unevaluatedProperties: false
>>   
>> +allOf:
>> +  - $ref: ethernet-phy.yaml#
>> +  - if:
>> +      properties:
>> +        compatible:
>> +          contains:
>> +            const: ethernet-phy-id001c.c916
>> +    then:
>> +      properties:
>> +        leds: true
> 
> This has no effect. 'leds' node is already allowed with the ref to
> ethernet-phy.yaml. I suppose you could negate the if and then, but I'm
> not really that worried if someone defines LEDs for a device with no
> LEDs.

So shall I simply do:

leds: true

and by done with it, as the easier way out ?
Krzysztof Kozlowski July 9, 2024, 9:01 a.m. UTC | #3
On 08/07/2024 23:01, Marek Vasut wrote:
>>>   
>>> +allOf:
>>> +  - $ref: ethernet-phy.yaml#
>>> +  - if:
>>> +      properties:
>>> +        compatible:
>>> +          contains:
>>> +            const: ethernet-phy-id001c.c916
>>> +    then:
>>> +      properties:
>>> +        leds: true
>>
>> This has no effect. 'leds' node is already allowed with the ref to
>> ethernet-phy.yaml. I suppose you could negate the if and then, but I'm
>> not really that worried if someone defines LEDs for a device with no
>> LEDs.
> 
> So shall I simply do:
> 
> leds: true
> 
> and by done with it, as the easier way out ?

No, you should not have to do anything. Do you see any dtbs_check error
without this patch?

Best regards,
Krzysztof
Marek Vasut July 9, 2024, 11:37 a.m. UTC | #4
On 7/9/24 11:01 AM, Krzysztof Kozlowski wrote:
> On 08/07/2024 23:01, Marek Vasut wrote:
>>>>    
>>>> +allOf:
>>>> +  - $ref: ethernet-phy.yaml#
>>>> +  - if:
>>>> +      properties:
>>>> +        compatible:
>>>> +          contains:
>>>> +            const: ethernet-phy-id001c.c916
>>>> +    then:
>>>> +      properties:
>>>> +        leds: true
>>>
>>> This has no effect. 'leds' node is already allowed with the ref to
>>> ethernet-phy.yaml. I suppose you could negate the if and then, but I'm
>>> not really that worried if someone defines LEDs for a device with no
>>> LEDs.
>>
>> So shall I simply do:
>>
>> leds: true
>>
>> and by done with it, as the easier way out ?
> 
> No, you should not have to do anything. Do you see any dtbs_check error
> without this patch?

Not yet, but I do plan to describe PHY LEDs on a board I have locally, 
with RTL8211F PHY.

I sent a V2 of this patch with leds:true and this conditional inverted.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml b/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml
index 18ee72f5c74a8..28c048368073b 100644
--- a/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml
+++ b/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml
@@ -14,9 +14,6 @@  maintainers:
 description:
   Bindings for Realtek RTL82xx PHYs
 
-allOf:
-  - $ref: ethernet-phy.yaml#
-
 properties:
   compatible:
     enum:
@@ -54,6 +51,17 @@  properties:
 
 unevaluatedProperties: false
 
+allOf:
+  - $ref: ethernet-phy.yaml#
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: ethernet-phy-id001c.c916
+    then:
+      properties:
+        leds: true
+
 examples:
   - |
     mdio {