Skip to contentSkip to conversation

dt-bindings: leds: Update devicetree documents for ID_RGB

PATCH Superseded Dan Murphy 2 participants 2 messages Oct 13, 2020 – Oct 14, 2020

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Dan Murphy

author
#0 lore raw

PATCH 1/1 dt-bindings: leds: Update devicetree documents for ID_RGB

Update the leds/common.yaml to indicate that the max color ID is 9. Reflect the same change in the leds-class-multicolor.yaml

---
 Documentation/devicetree/bindings/leds/common.yaml       | 2 +-
 .../devicetree/bindings/leds/leds-class-multicolor.yaml  | 9 +++++----
 2 files changed, 6 insertions(+), 5 deletions(-)
Documentation/devicetree/bindings/leds/common.yaml +1 -1
index a2a541bca73c..0c9f912dfee6 100644
@@ -43,7 +43,7 @@ properties:
       LED_COLOR_ID available, add a new one.
     $ref: /schemas/types.yaml#definitions/uint32
     minimum: 0
-    maximum: 8
+    maximum: 9
 
   function-enumerator:
     description:
Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml +5 -4
index b55e1f1308a4..f8032e863ecb 100644
@@ -16,7 +16,7 @@ description: |
   modules. This is achieved by adding multi-led nodes layer to the
   monochrome LED bindings.
   The nodes and properties defined in this document are unique to the multicolor
-  LED class.  Common LED nodes and properties are inherited from the common.txt
+  LED class.  Common LED nodes and properties are inherited from the common.yaml
   within this documentation directory.
 
 patternProperties:
@@ -25,10 +25,11 @@ patternProperties:
     description: Represents the LEDs that are to be grouped.
     properties:
       color:
-        const: 8  # LED_COLOR_ID_MULTI
+        const: 9  # LED_COLOR_ID_RGB
         description: |
-          For multicolor LED support this property should be defined as
-          LED_COLOR_ID_MULTI which can be found in include/linux/leds/common.h.
+          For multicolor LED support this property should be defined as either
+          LED_COLOR_ID_RGB or LED_COLOR_ID_MULTI which can be found in
+          include/linux/leds/common.h.
 
     $ref: "common.yaml#"
 
Signature · 1 line
2.28.0.585.ge1cfff676549
#1 lore raw
Quoted 37 lines · Dan Murphy

Update the leds/common.yaml to indicate that the max color ID is 9. Reflect the same change in the leds-class-multicolor.yaml

---
 Documentation/devicetree/bindings/leds/common.yaml       | 2 +-
 .../devicetree/bindings/leds/leds-class-multicolor.yaml  | 9 +++++----
 2 files changed, 6 insertions(+), 5 deletions(-)
Documentation/devicetree/bindings/leds/common.yaml +1 -1
index a2a541bca73c..0c9f912dfee6 100644
@@ -43,7 +43,7 @@ properties:
       LED_COLOR_ID available, add a new one.
     $ref: /schemas/types.yaml#definitions/uint32
     minimum: 0
-    maximum: 8
+    maximum: 9
 
   function-enumerator:
     description:
Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml +1 -1
index b55e1f1308a4..f8032e863ecb 100644
@@ -16,7 +16,7 @@ description: |
   modules. This is achieved by adding multi-led nodes layer to the
   monochrome LED bindings.
   The nodes and properties defined in this document are unique to the multicolor
-  LED class.  Common LED nodes and properties are inherited from the common.txt
+  LED class.  Common LED nodes and properties are inherited from the common.yaml
   within this documentation directory.
 
 patternProperties:

Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml patternProperties: · line 28

Quoted 5 lines
Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml +1 -1
@@ -25,10 +25,11 @@ patternProperties:
     description: Represents the LEDs that are to be grouped.
     properties:
       color:
-        const: 8  # LED_COLOR_ID_MULTI
+        const: 9  # LED_COLOR_ID_RGB

This means only LED_COLOR_ID_RGB is allowed.

Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml patternProperties: · line 31

Quoted 5 lines
Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml +2 -2
         description: |
-          For multicolor LED support this property should be defined as
-          LED_COLOR_ID_MULTI which can be found in include/linux/leds/common.h.
+          For multicolor LED support this property should be defined as either
+          LED_COLOR_ID_RGB or LED_COLOR_ID_MULTI which can be found in

If both LED_COLOR_ID_RGB and LED_COLOR_ID_MULTI are allowed, then we should use enum list both of them.

Quoted 5 lines
Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml +1 -0
+          include/linux/leds/common.h.
 
     $ref: "common.yaml#"