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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e0f63b9a-b8d2-9477-eac3-737c4059cfb7@linaro.org>
Date:   Wed, 7 Jun 2023 20:24:49 +0200
From:   Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To:     Zev Weiss <zev@...ilderbeest.net>,
        Conor Dooley <conor+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Rob Herring <robh+dt@...nel.org>, devicetree@...r.kernel.org
Cc:     Guenter Roeck <linux@...ck-us.net>,
        Jean Delvare <jdelvare@...e.com>, linux-hwmon@...r.kernel.org,
        linux-kernel@...r.kernel.org, openbmc@...ts.ozlabs.org
Subject: Re: [PATCH 1/2] dt-bindings: hwmon: Add Nuvoton NCT7362Y binding

On 07/06/2023 12:18, Zev Weiss wrote:
> This binding describes the NCT7362Y, a 16-channel fan/GPIO controller.

A nit, subject: drop second/last, redundant "binding". The "dt-bindings"
prefix is already stating that these are bindings.

> 
> Signed-off-by: Zev Weiss <zev@...ilderbeest.net>
> ---
>  .../bindings/hwmon/nuvoton,nct7362.yaml       | 123 ++++++++++++++++++
>  1 file changed, 123 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/hwmon/nuvoton,nct7362.yaml
> 
> diff --git a/Documentation/devicetree/bindings/hwmon/nuvoton,nct7362.yaml b/Documentation/devicetree/bindings/hwmon/nuvoton,nct7362.yaml
> new file mode 100644
> index 000000000000..630dcce7a14c
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/hwmon/nuvoton,nct7362.yaml
> @@ -0,0 +1,123 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/hwmon/nuvoton,nct7362.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Nuvoton NCT7362Y fan controller
> +
> +maintainers:
> +  - Zev Weiss <zev@...ilderbeest.net>
> +
> +description: |
> +  The Nuvoton NCT7362Y is an I2C fan controller with 16 pins that can
> +  be independently configured for PWM, fan tach, or GPIO
> +  functionality.  Each pin's functionality is represented by a child
> +  node.
> +
> +  The datasheet is not publicly available but can be requested from
> +  Nuvoton via their web site.
> +
> +properties:
> +  compatible:
> +    enum:
> +      - nuvoton,nct7362
> +
> +  reg:
> +    maxItems: 1
> +
> +  "#address-cells":
> +    const: 1
> +
> +  "#size-cells":
> +    const: 0
> +
> +  gpio-controller: true
> +
> +  "#gpio-cells":
> +    const: 2
> +
> +  gpio-line-names:
> +    minItems: 1
> +    maxItems: 16
> +
> +patternProperties:
> +  "^tach@([1-8]|1[0-7])$":

@9 is not valid? Aren't you using some non-numerical values?

> +    type: object
> +    properties:
> +      reg:
> +        maxItems: 1
> +        description: The pin number.
> +
> +      nuvoton,pulses-per-revolution:

Just "pulses-per-revolution"

https://lore.kernel.org/linux-devicetree/20221116213615.1256297-2-Naresh.Solanki@9elements.com/

> +        description: |
> +          The number of tach pulses per revolution of the fan.
> +        $ref: /schemas/types.yaml#/definitions/uint32
> +        minimum: 1
> +        default: 2
> +
> +    required:
> +      - reg
> +
> +  "^pwm@([1-8]|1[0-7])$":
> +    type: object
> +    properties:
> +      reg:
> +        maxItems: 1
> +        description: The pin number.

This is some plague of single-property-nodes... Aspeed also sends
something similar. Why the heck do you need empty nodes?

Drop entire node pwm.


> +    required:
> +      - reg
> +
> +  "^gpio@([1-8]|1[0-7])$":
> +    type: object
> +    properties:
> +      reg:
> +        maxItems: 1
> +        description: The pin number.

Drop entire node gpio.

If this is pinctrl, then make it a pinctrl.

> +    required:
> +      - reg
> +
> +required:
> +  - compatible
> +  - reg
> +  - "#address-cells"
> +  - "#size-cells"

Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ