Re: [PATCH v9 1/4] dt-bindings: leds: add TI/National Semiconductor LP5812 LED Driver

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

 



On Wed, 11 Jun 2025, Krzysztof Kozlowski wrote:

> > +patternProperties:
> > +  "^led@[0-3]$":
> > +    type: object
> > +    $ref: common.yaml#
> > +    unevaluatedProperties: false
> > +
> > +    properties:
> > +      led-cur:
> > +        $ref: /schemas/types.yaml#/definitions/uint8
> > +        description: |
> > +          LED current in 0.1 mA steps (e.g., 150 = 15.0 mA; 0 if not connected)
> > +        minimum: 0
> > +        maximum: 255
> > +
> > +      max-cur:
> > +        $ref: /schemas/types.yaml#/definitions/uint8
> > +        description: Maximum allowed current in 0.1 mA steps
> > +
> > +      reg:
> > +        minimum: 0
> > +        maximum: 3
> 
> Place properties according to DTS coding style.

Got it! I'll update the property order accordingly.

> > +  '^multi-led@[4-7]$':
> > +    type: object
> > +    $ref: leds-class-multicolor.yaml#
> > +    unevaluatedProperties: false
> > +
> > +    properties:
> > +      reg:
> > +        minimum: 4
> > +        maximum: 7
> > +
> > +      '#address-cells':
> 
> Don't mix quotes. Either ' or "

I'll use consistent ".

> > +        const: 1
> > +
> > +      '#size-cells':
> > +        const: 0
> > +
> > +    patternProperties:
> > +      "^led@[4-9a-f]$":
> > +        type: object
> > +        $ref: common.yaml#
> > +        unevaluatedProperties: false
> > +
> > +        properties:
> > +          led-cur:
> > +            $ref: /schemas/types.yaml#/definitions/uint8
> 
> No, use existing led common properties. Also observe the units - this is
> not uint8 but a defined type for microamp, see property-units in
> dtschema.
> 
> > +            description: |
> > +              LED current in 0.1 mA steps (e.g., 150 = 15.0 mA; 0 if not connected)
> > +            minimum: 0
> > +            maximum: 255
> > +
> > +          max-cur:
> > +            $ref: /schemas/types.yaml#/definitions/uint8
> 
> No, use existing led common properties. Same everywhere.

I'll replace max-cur with the standard led-max-microamp.
I'll remove led-cur as there's no equivalent LED common property to represent it.
The LED current can be configured runtime via the led_current sysfs.

> > +examples:
> > +  - |
> > +    #include <dt-bindings/leds/common.h>
> > +
> > +    i2c {
> > +        #address-cells = <1>;
> > +        #size-cells = <0>;
> > +
> > +        led-controller@1b {
> > +            #address-cells = <1>;
> > +            #size-cells = <0>;
> > +            compatible = "ti,lp5812";
> > +            reg = <0x1b>;
> > +            vcc-supply = <&vdd_3v3_reg>;
> > +
> > +            led@0 {
> > +              reg = <0x0>;
> 
> 
> Messed/mixed indentation.

I'll fix it.

> BTW, such significant binding change at v9, invalidting reviews and
> rewriting the binding completely, is surprising.

Understood. I restructured the binding in v9 to align with leds-class-multicolor.yaml
and better represent the LP5812 hierarchy.
I'll make sure to highlight such major changes more clearly in future revisions.

Appreciate your time and feedback.

Best regards,
Nam Tran




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux