summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/leds
diff options
context:
space:
mode:
authorDmitry Rokosov <ddrokosov@salutedevices.com>2023-11-25 23:05:19 +0300
committerLee Jones <lee@kernel.org>2023-12-13 14:29:04 +0300
commit94d4090b61395ca5542d4af72db464eeaa298088 (patch)
tree1ee977ba26630c376ebbafb01d69670694e597ef /Documentation/devicetree/bindings/leds
parent13b93b1dca355ac87f470b12c72c0788a3a10da5 (diff)
downloadlinux-94d4090b61395ca5542d4af72db464eeaa298088.tar.xz
dt-bindings: leds: aw200xx: Fix led pattern and add reg constraints
AW200XX controllers have the capability to declare more than 0xf LEDs, therefore, it is necessary to accept LED names using an appropriate regex pattern. The register offsets can be adjusted within the specified range, with the maximum value corresponding to the highest number of LEDs that can be connected to the controller. Fixes: e338a05e76ca ("dt-bindings: leds: Add binding for AW200xx") Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20231125200519.1750-12-ddrokosov@salutedevices.com Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'Documentation/devicetree/bindings/leds')
-rw-r--r--Documentation/devicetree/bindings/leds/awinic,aw200xx.yaml59
1 files changed, 58 insertions, 1 deletions
diff --git a/Documentation/devicetree/bindings/leds/awinic,aw200xx.yaml b/Documentation/devicetree/bindings/leds/awinic,aw200xx.yaml
index 67c1d960db1d..54d6d1f08e24 100644
--- a/Documentation/devicetree/bindings/leds/awinic,aw200xx.yaml
+++ b/Documentation/devicetree/bindings/leds/awinic,aw200xx.yaml
@@ -45,7 +45,7 @@ properties:
maxItems: 1
patternProperties:
- "^led@[0-9a-f]$":
+ "^led@[0-9a-f]+$":
type: object
$ref: common.yaml#
unevaluatedProperties: false
@@ -69,6 +69,63 @@ patternProperties:
where max-current-switch-number is determinated by led configuration
and depends on how leds are physically connected to the led driver.
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: awinic,aw20036
+ then:
+ patternProperties:
+ "^led@[0-9a-f]+$":
+ properties:
+ reg:
+ items:
+ minimum: 0
+ maximum: 36
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: awinic,aw20054
+ then:
+ patternProperties:
+ "^led@[0-9a-f]+$":
+ properties:
+ reg:
+ items:
+ minimum: 0
+ maximum: 54
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: awinic,aw20072
+ then:
+ patternProperties:
+ "^led@[0-9a-f]+$":
+ properties:
+ reg:
+ items:
+ minimum: 0
+ maximum: 72
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: awinic,aw20108
+ then:
+ patternProperties:
+ "^led@[0-9a-f]+$":
+ properties:
+ reg:
+ items:
+ minimum: 0
+ maximum: 108
+
required:
- compatible
- reg