lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250611-nimble-archetypal-raptor-eadcb6@kuoka>
Date: Wed, 11 Jun 2025 10:24:47 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Nam Tran <trannamatk@...il.com>
Cc: lee@...nel.org, pavel@...nel.org, krzk+dt@...nel.org, robh@...nel.org, 
	conor+dt@...nel.org, corbet@....net, linux-leds@...r.kernel.org, 
	linux-kernel@...r.kernel.org, devicetree@...r.kernel.org, linux-doc@...r.kernel.org
Subject: Re: [PATCH v9 1/4] dt-bindings: leds: add TI/National Semiconductor
 LP5812 LED Driver

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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ