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: <0e66efd9-6507-4c58-8ad5-d27e9e334238@kernel.org>
Date: Mon, 30 Dec 2024 12:27:23 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Troy Mitchell <troymitchell988@...il.com>, Lee Jones <lee@...nel.org>,
 Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
 Conor Dooley <conor+dt@...nel.org>
Cc: linux-riscv@...ts.infradead.org, devicetree@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] dt-bindings: mfd: add support for P1 from SpacemiT

On 30/12/2024 11:02, Troy Mitchell wrote:
> +
> +properties:
> +  compatible:
> +    const: spacemit,p1-pmic


spacemit,p1

Unless this can be something else?

> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  regulators:
> +    type: object
> +
> +    properties:
> +      compatible:
> +        const: pmic,p1-regulator

Drop compatible, regulators are not re-usable blocks.

> +
> +    required:
> +      - compatible
> +
> +    patternProperties:
> +      "^(dcdc-reg[1-6]|aldo-reg[1-4]|dldo-reg[1-7]|switch)$":

You can drop all "reg" suffixes.

> +        type: object
> +        $ref: /schemas/regulator/regulator.yaml#
> +        unevaluatedProperties: false
> +
> +    unevaluatedProperties: false
> +
> +  pinctrl:

pinctrl or gpio?

> +    type: object
> +
> +    properties:
> +      compatible:
> +        const: pmic,p1-pinctrl
> +
> +      "#gpio-cells":
> +        const: 2
> +
> +      gpio-controller: true
> +
> +    required:
> +      - compatible
> +      - "#gpio-cells"
> +      - gpio-controller
> +
> +    unevaluatedProperties: false

No $ref? Then additionalProperties and put it after type: ... but if you
do not have here pinctrl, then just fold the node into parent.


> +
> +  pwrkey:
> +    type: object
> +    $ref: /schemas/input/input.yaml#
> +
> +    properties:
> +      compatible:
> +        const: pmic,p1-pwrkey
> +
> +    required:
> +      - compatible


No resources here, fold the device into parent.


> +
> +    unevaluatedProperties: false
> +
> +  rtc:
> +    type: object
> +    $ref: /schemas/rtc/rtc.yaml#


No resources here, fold the device into parent.

> +
> +    properties:
> +      compatible:
> +        const: pmic,p1-rtc
> +
> +    required:
> +      - compatible
> +
> +    unevaluatedProperties: false
> +
> +

Only one blank line

> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +
> +unevaluatedProperties: false


example-schema explains when to use unevaluated/additionalProps.


Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ