Skip to contentSkip to conversation

dt-bindings: backlight: lm3630a: correct schema validation

PATCH Applied Brian Masney 5 participants 5 messages May 20, 2019 – Jun 28, 2019

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dt-bindings: backlight: lm3630a: correct schema validation

The '#address-cells' and '#size-cells' properties were not defined in the lm3630a bindings and would cause the following error when attempting to validate the examples against the schema:

Documentation/devicetree/bindings/leds/backlight/lm3630a-backlight.example.dt.yaml:
'#address-cells', '#size-cells' do not match any of the regexes:
'^led@[01]$', 'pinctrl-[0-9]+'

Correct this by adding those two properties.

While we're here, move the ti,linear-mapping-mode property to the led@[01] child nodes to correct the following validation error:

Documentation/devicetree/bindings/leds/backlight/lm3630a-backlight.example.dt.yaml:
led@0: 'ti,linear-mapping-mode' does not match any of the regexes:
'pinctrl-[0-9]+'

Fixes 32fcb75c66a0 ("dt-bindings: backlight: Add lm3630a bindings")
---
 .../leds/backlight/lm3630a-backlight.yaml     | 20 +++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)
Documentation/devicetree/bindings/leds/backlight/lm3630a-backlight.yaml +14 -6
index 4d61fe0a98a4..f0855e248ae5 100644
@@ -23,16 +23,17 @@ properties:
   reg:
     maxItems: 1
 
-  ti,linear-mapping-mode:
-    description: |
-      Enable linear mapping mode. If disabled, then it will use exponential
-      mapping mode in which the ramp up/down appears to have a more uniform
-      transition to the human eye.
-    type: boolean
+  '#address-cells':
+    const: 1
+
+  '#size-cells':
+    const: 0
 
 required:
   - compatible
   - reg
+  - '#address-cells'
+  - '#size-cells'
 
 patternProperties:
   "^led@[01]$":
@@ -73,6 +74,13 @@ patternProperties:
         minimum: 0
         maximum: 255
 
+      ti,linear-mapping-mode:
+        description: |
+          Enable linear mapping mode. If disabled, then it will use exponential
+          mapping mode in which the ramp up/down appears to have a more uniform
+          transition to the human eye.
+        type: boolean
+
     required:
       - reg
 
Signature · 1 line
2.20.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 18 lines · Brian Masney

The '#address-cells' and '#size-cells' properties were not defined in the lm3630a bindings and would cause the following error when attempting to validate the examples against the schema:

Documentation/devicetree/bindings/leds/backlight/lm3630a-backlight.example.dt.yaml:
'#address-cells', '#size-cells' do not match any of the regexes:
'^led@[01]$', 'pinctrl-[0-9]+'

Correct this by adding those two properties.

While we're here, move the ti,linear-mapping-mode property to the led@[01] child nodes to correct the following validation error:

Documentation/devicetree/bindings/leds/backlight/lm3630a-backlight.example.dt.yaml:
led@0: 'ti,linear-mapping-mode' does not match any of the regexes:
'pinctrl-[0-9]+'

Quoted 6 lines
Fixes 32fcb75c66a0 ("dt-bindings: backlight: Add lm3630a bindings")
---
 .../leds/backlight/lm3630a-backlight.yaml     | 20 +++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw
Quoted 19 lines · Rob Herring
Quoted 18 lines · Brian Masney

The '#address-cells' and '#size-cells' properties were not defined in the lm3630a bindings and would cause the following error when attempting to validate the examples against the schema:

Documentation/devicetree/bindings/leds/backlight/lm3630a-backlight.example.dt.yaml:
'#address-cells', '#size-cells' do not match any of the regexes:
'^led@[01]$', 'pinctrl-[0-9]+'

Correct this by adding those two properties.

While we're here, move the ti,linear-mapping-mode property to the led@[01] child nodes to correct the following validation error:

Documentation/devicetree/bindings/leds/backlight/lm3630a-backlight.example.dt.yaml:
led@0: 'ti,linear-mapping-mode' does not match any of the regexes:
'pinctrl-[0-9]+'

Quoted 8 lines
Quoted 6 lines
Fixes 32fcb75c66a0 ("dt-bindings: backlight: Add lm3630a bindings")
---
 .../leds/backlight/lm3630a-backlight.yaml     | 20 +++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)
Acked-by
#3 lore raw
Quoted 27 lines · Daniel Thompson
Quoted 26 lines · Rob Herring
Quoted 24 lines · Brian Masney

The '#address-cells' and '#size-cells' properties were not defined in the lm3630a bindings and would cause the following error when attempting to validate the examples against the schema:

Documentation/devicetree/bindings/leds/backlight/lm3630a-backlight.example.dt.yaml:
'#address-cells', '#size-cells' do not match any of the regexes:
'^led@[01]$', 'pinctrl-[0-9]+'

Correct this by adding those two properties.

While we're here, move the ti,linear-mapping-mode property to the led@[01] child nodes to correct the following validation error:

Documentation/devicetree/bindings/leds/backlight/lm3630a-backlight.example.dt.yaml:
led@0: 'ti,linear-mapping-mode' does not match any of the regexes:
'pinctrl-[0-9]+'

Fixes 32fcb75c66a0 ("dt-bindings: backlight: Add lm3630a bindings")
---
 .../leds/backlight/lm3630a-backlight.yaml     | 20 +++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)
Quoted 4 lines
Quoted 1 line
maintainer Applied
#4 lore raw
In reply to Brian Masney
Quoted 17 lines · Brian Masney

The '#address-cells' and '#size-cells' properties were not defined in the lm3630a bindings and would cause the following error when attempting to validate the examples against the schema:

Documentation/devicetree/bindings/leds/backlight/lm3630a-backlight.example.dt.yaml:
'#address-cells', '#size-cells' do not match any of the regexes:
'^led@[01]$', 'pinctrl-[0-9]+'

Correct this by adding those two properties.

While we're here, move the ti,linear-mapping-mode property to the led@[01] child nodes to correct the following validation error:

Documentation/devicetree/bindings/leds/backlight/lm3630a-backlight.example.dt.yaml:
led@0: 'ti,linear-mapping-mode' does not match any of the regexes:
'pinctrl-[0-9]+'

Quoted 7 lines
Fixes 32fcb75c66a0 ("dt-bindings: backlight: Add lm3630a bindings")
---
 .../leds/backlight/lm3630a-backlight.yaml     | 20 +++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

Applied, thanks.

Rob
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel