Commit 960c2de7 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Rob Herring

dt-bindings: leds: mt6360: rework to match multi-led

The binding allows two type of LEDs - single and multi-color.  They
differ with properties, so fix the bindings to accept both cases.
Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20221127204058.57111-6-krzysztof.kozlowski@linaro.orgSigned-off-by: default avatarRob Herring <robh@kernel.org>
parent b82fa853
...@@ -26,11 +26,10 @@ properties: ...@@ -26,11 +26,10 @@ properties:
const: 0 const: 0
patternProperties: patternProperties:
"^(multi-)?led@[0-5]$": "^multi-led@[0-5]$":
type: object type: object
$ref: common.yaml# $ref: leds-class-multicolor.yaml#
description: unevaluatedProperties: false
Properties for a single LED.
properties: properties:
reg: reg:
...@@ -43,6 +42,42 @@ patternProperties: ...@@ -43,6 +42,42 @@ patternProperties:
- 4 # LED output FLASH1 - 4 # LED output FLASH1
- 5 # LED output FLASH2 - 5 # LED output FLASH2
"#address-cells":
const: 1
"#size-cells":
const: 0
patternProperties:
"^led@[0-2]$":
type: object
$ref: common.yaml#
unevaluatedProperties: false
properties:
reg:
enum: [0, 1, 2]
required:
- reg
- color
required:
- reg
- "#address-cells"
- "#size-cells"
"^led@[0-5]$":
type: object
$ref: common.yaml#
unevaluatedProperties: false
description:
Properties for a single LED.
properties:
reg:
enum: [0, 1, 2, 3, 4, 5]
required: required:
- compatible - compatible
- "#address-cells" - "#address-cells"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment