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: <20250415-dashing-impartial-baboon-70d086@shite>
Date: Tue, 15 Apr 2025 09:55:33 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Ante Knezic <ante.knezic@...mholz.de>
Cc: linux-leds@...r.kernel.org, lee@...nel.org, pavel@...nel.org, 
	robh@...nel.org, krzk+dt@...nel.org, conor+dt@...nel.org, corbet@....net, 
	knezic@...mholz.com, devicetree@...r.kernel.org, linux-kernel@...r.kernel.org, 
	linux-doc@...r.kernel.org
Subject: Re: [PATCH 2/3] dt-bindings: leds: add binding for WL-ICLED

On Mon, Apr 14, 2025 at 03:28:50PM GMT, Ante Knezic wrote:
> From: Ante Knezic <knezic@...mholz.com>
> 
> WL-ICLED is a RGB LED with integrated IC from Wurth Elektronik.
> Individual color brightness can be controlled via SPI protocol.
> 
> Signed-off-by: Ante Knezic <knezic@...mholz.com>
> ---
>  .../bindings/leds/leds-wl-icled.yaml          | 88 +++++++++++++++++++

Filename based on compatible. Choose one compatible and use it here.

>  1 file changed, 88 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/leds/leds-wl-icled.yaml
> 
> diff --git a/Documentation/devicetree/bindings/leds/leds-wl-icled.yaml b/Documentation/devicetree/bindings/leds/leds-wl-icled.yaml
> new file mode 100644
> index 000000000000..bf79c7a1719b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/leds/leds-wl-icled.yaml
> @@ -0,0 +1,88 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/leds/leds-wl-icled.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: LED driver for WL-ICLEDs from Wurth Elektronik.

driver as Linux driver? Then drop and describe hardware.

Also drop full stop

> +
> +maintainers:
> +  - Ante Knezic <ante.knezic@...mholz.de>
> +
> +description: |
> +  The WL-ICLEDs are RGB LEDs with integrated controller that can be
> +  daisy-chained to arbitrary number of LEDs. Communication with LEDs is
> +  via SPI interface and can be single or two wire, depending on the model.
> +  For more product information please see the link below:
> +  https://www.we-online.com/en/components/products/WL-ICLED
> +
> +properties:
> +  compatible:
> +    enum:
> +      - we,1315x246
> +      - we,1315x002
> +      - we,131x000
> +      - we,131161x
> +      - we,131212x

Is that a wildcard in each compatible?

> +
> +  '#address-cells':
> +    const: 1
> +
> +  '#size-cells':
> +    const: 0
> +
> +patternProperties:
> +  '^led@[0-9a-f]$':
> +    type: object
> +    $ref: leds-class-multicolor.yaml#
> +    unevaluatedProperties: false
> +
> +    properties:
> +      reg:
> +        maxItems: 1
> +        description:
> +          This property denotes the LED position in the daisy chain
> +          series. It is a zero based LED identifier.
> +
> +required:
> +  - compatible
> +  - reg
> +

Missing ref to spi periph schema. See other bindings.

> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/gpio/gpio.h>
> +    #include <dt-bindings/leds/common.h>
> +
> +    spi {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        icled@1 {


Node names should be generic. See also an explanation and list of
examples (not exhaustive) in DT specification:
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation

led-controller

> +            compatible = "we,131x000";
> +            #address-cells = <1>;
> +            #size-cells = <0>;
> +            reg = <1>;
> +            cs-gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
> +
> +            led@0 {
> +                reg = <0>;
> +                color = <LED_COLOR_ID_RGB>;
> +                function = "error";

Use standard defines.

> +            };
> +
> +            led@1 {
> +                reg = <1>;
> +                color = <LED_COLOR_ID_RGB>;
> +                function = "warning";

Best regards,
Krzysztof


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ