Re: [PATCH v5 1/2] dt-bindings: leds: Add multicolor PWM LED bindings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Rob,

Thanks for your comments.

On 2/7/22 21:21, Rob Herring wrote:
+properties:
+  compatible:
+    const: pwm-leds-multicolor
+
+  multi-led:
+    type: object
+    allOf:
+      - $ref: leds-class-multicolor.yaml#

This schema says 'multi-led' here should have a child called
"^multi-led@([0-9a-f])$". You are off a level.

So it should have been?

properties:
  compatible:
    const: pwm-leds-multicolor
  allOf:
    - $ref: leds-class-multicolor.yaml#

This would imply that the multi-led node requires a unit address (reg property). That doesn't make sense in this case. How should we resolve this?

+
+    patternProperties:
+      "^led-[0-9a-z]+$":
+        type: object

            $ref: common.yaml#
            additionalProperties: false

Sounds good.

+        properties:
+          pwms:
+            maxItems: 1
+
+          pwm-names: true
+
+          color:
+            $ref: common.yaml#/properties/color

And then drop this ref.

Curiosity question: why? Should I refer to an unsigned integer type instead?

+    rgb-led {
+        compatible = "pwm-leds-multicolor";
+
+        multi-led {

Can't this be collapsed into 1 level? I don't see "pwm-leds-multicolor"
having other child nodes.

It could. The reason I added the multi-led level is because the leds-class-multicolor.yaml schema calls for it. Perhaps I missed the intention of that schema but isn't it there to create a uniform binding schema structure across drivers?

Best regards,
Sven



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux