Skip to contentSkip to conversation

dt-bindings: leds: intel,lgm: Add missing 'led-gpios' property

PATCH Applied Rob Herring 4 participants 9 messages Dec 7, 2022 – Dec 12, 2022

Subsystems (3)
lore
Share & tools
lore

Rob Herring

author maintainer
#0 lore raw

PATCH 1/2 dt-bindings: leds: intel,lgm: Add missing 'led-gpios' property

The example has 'led-gpio' properties, but that's not documented. As the 'gpio' form is deprecated, add 'led-gpios' to the schema and update the example.

---
 Documentation/devicetree/bindings/leds/leds-lgm.yaml | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/leds/leds-lgm.yaml +5 -2
index f8d7963c3a13..3f13db0dc915 100644
@@ -64,6 +64,9 @@ properties:
             minimum: 0
             maximum: 2
 
+          led-gpios:
+            maxItems: 1
+
           intel,sso-hw-trigger:
             type: boolean
             description: This property indicates Hardware driven/control LED.
@@ -118,14 +121,14 @@ examples:
           reg = <0>;
           function = "gphy";
           color = <LED_COLOR_ID_GREEN>;
-          led-gpio = <&ssogpio 0 0>;
+          led-gpios = <&ssogpio 0 0>;
         };
 
         led@2 {
           reg = <2>;
           function = LED_FUNCTION_POWER;
           color = <LED_COLOR_ID_GREEN>;
-          led-gpio = <&ssogpio 23 0>;
+          led-gpios = <&ssogpio 23 0>;
         };
       };
     };
Signature · 1 line
2.35.1
author maintainer
#1 lore raw

PATCH 2/2 dt-bindings: leds: Add missing references to common LED schema

'led' nodes should have a reference to LED common.yaml schema. Add it where missing and drop any duplicate properties.

---
 .../devicetree/bindings/leds/leds-lgm.yaml       |  3 ++-
 .../devicetree/bindings/leds/leds-max77650.yaml  |  9 ++-------
 .../bindings/leds/rohm,bd71828-leds.yaml         | 16 +++-------------
 3 files changed, 7 insertions(+), 21 deletions(-)
Documentation/devicetree/bindings/leds/leds-lgm.yaml +2 -1
index 3f13db0dc915..8b3b3bf1eaf2 100644
@@ -56,7 +56,8 @@ properties:
 
     patternProperties:
       "^led@[0-2]$":
-        type: object
+        $ref: common.yaml#
+        unevaluatedProperties: false
 
         properties:
           reg:
Documentation/devicetree/bindings/leds/leds-max77650.yaml +2 -7
index c6f96cabd4d1..fdb08f44a45d 100644
@@ -30,9 +30,8 @@ properties:
 
 patternProperties:
   "^led@[0-2]$":
-    type: object
-    description: |
-      Properties for a single LED.
+    $ref: common.yaml#
+    unevaluatedProperties: false
 
     properties:
       reg:
@@ -41,10 +40,6 @@ patternProperties:
         minimum: 0
         maximum: 2
 
-      label: true
-
-      linux,default-trigger: true
-
 required:
   - compatible
   - "#address-cells"
Documentation/devicetree/bindings/leds/rohm,bd71828-leds.yaml +3 -13
index 86a37c92b834..ca92cea56a6f 100644
@@ -26,26 +26,16 @@ properties:
 
 patternProperties:
   "^led-[1-2]$":
-    type: object
-    description:
-      Properties for a single LED.
+    $ref: common.yaml#
+    unevaluatedProperties: false
+
     properties:
-      #allOf:
-        #- $ref: "common.yaml#"
       rohm,led-compatible:
         description: LED identification string
         $ref: "/schemas/types.yaml#/definitions/string"
         enum:
           - bd71828-ambled
           - bd71828-grnled
-      function:
-        description:
-          Purpose of LED as defined in dt-bindings/leds/common.h
-        $ref: "/schemas/types.yaml#/definitions/string"
-      color:
-        description:
-          LED colour as defined in dt-bindings/leds/common.h
-        $ref: "/schemas/types.yaml#/definitions/uint32"
 
 required:
   - compatible
Signature · 1 line
2.35.1
Acked-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] dt-bindings: leds: Add missing references to common LED schema

Quoted 26 lines · Rob Herring

'led' nodes should have a reference to LED common.yaml schema. Add it where missing and drop any duplicate properties.

---

 .../devicetree/bindings/leds/leds-max77650.yaml  |  9 ++-------
Documentation/devicetree/bindings/leds/leds-max77650.yaml +2 -3
index c6f96cabd4d1..fdb08f44a45d 100644
@@ -30,9 +30,8 @@ properties:
 
 patternProperties:
   "^led@[0-2]$":
-    type: object
-    description: |
-      Properties for a single LED.
+    $ref: common.yaml#
+    unevaluatedProperties: false
 
     properties:
       reg:

Documentation/devicetree/bindings/leds/leds-max77650.yaml patternProperties: · line 45

Quoted 10 lines
Documentation/devicetree/bindings/leds/leds-max77650.yaml +0 -4
@@ -41,10 +40,6 @@ patternProperties:
         minimum: 0
         maximum: 2
 
-      label: true
-
-      linux,default-trigger: true
-
 required:
   - compatible
   - "#address-cells"
Reviewed-by on v1 2/2
#3 lore raw

Re: [PATCH 2/2] dt-bindings: leds: Add missing references to common LED schema

In reply to Rob Herring
Quoted 10 lines · Rob Herring

'led' nodes should have a reference to LED common.yaml schema. Add it where missing and drop any duplicate properties.

---
 .../devicetree/bindings/leds/leds-lgm.yaml       |  3 ++-
 .../devicetree/bindings/leds/leds-max77650.yaml  |  9 ++-------
 .../bindings/leds/rohm,bd71828-leds.yaml         | 16 +++-------------
 3 files changed, 7 insertions(+), 21 deletions(-)

Best regards,
Krzysztof

maintainer Acked-by on v1 1/2
#7 lore raw
In reply to Rob Herring
Quoted 8 lines · Rob Herring

The example has 'led-gpio' properties, but that's not documented. As the 'gpio' form is deprecated, add 'led-gpios' to the schema and update the example.

---
 Documentation/devicetree/bindings/leds/leds-lgm.yaml | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Looks good. Who usually takes these?

Signature · 1 line
Lee Jones [李琼斯]
maintainer Acked-by on v1 2/2
#4 lore raw

Re: [PATCH 2/2] dt-bindings: leds: Add missing references to common LED schema

In reply to Rob Herring
Quoted 9 lines · Rob Herring

'led' nodes should have a reference to LED common.yaml schema. Add it where missing and drop any duplicate properties.

---
 .../devicetree/bindings/leds/leds-lgm.yaml       |  3 ++-
 .../devicetree/bindings/leds/leds-max77650.yaml  |  9 ++-------
 .../bindings/leds/rohm,bd71828-leds.yaml         | 16 +++-------------
 3 files changed, 7 insertions(+), 21 deletions(-)
Signature · 1 line
Lee Jones [李琼斯]
author maintainer Applied
#8 lore raw
In reply to Rob Herring
Quoted 9 lines · Rob Herring

The example has 'led-gpio' properties, but that's not documented. As the 'gpio' form is deprecated, add 'led-gpios' to the schema and update the example.

---
 Documentation/devicetree/bindings/leds/leds-lgm.yaml | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Applied, thanks!

author maintainer Applied
#5 lore raw

Re: [PATCH 2/2] dt-bindings: leds: Add missing references to common LED schema

In reply to Rob Herring
Quoted 10 lines · Rob Herring

'led' nodes should have a reference to LED common.yaml schema. Add it where missing and drop any duplicate properties.

---
 .../devicetree/bindings/leds/leds-lgm.yaml       |  3 ++-
 .../devicetree/bindings/leds/leds-max77650.yaml  |  9 ++-------
 .../bindings/leds/rohm,bd71828-leds.yaml         | 16 +++-------------
 3 files changed, 7 insertions(+), 21 deletions(-)

Applied, thanks!