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, Jun 11, 2025 at 12:43:15AM GMT, Nam Tran 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.

> +
> +  '^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 "

> +        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.

> +            description: Maximum allowed current in 0.1 mA steps
> +
> +          reg:
> +            minimum: 4
> +            maximum: 15
> +
> +        required:
> +          - reg
> +
> +required:
> +  - compatible
> +  - reg
> +
> +additionalProperties: false
> +
> +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.

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

Best regards,
Krzysztof





[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