Re: [RFC PATCH 1/5] regulator: dt-bindings: Add TI TPS65219 PMIC bindings

From: Rob Herring
Date: Thu Jun 16 2022 - 13:52:51 EST


On Mon, Jun 13, 2022 at 11:06:00AM +0200, Jerome NEANNE wrote:
> Add TPS65219 PMIC bindings using json-schema.
>
> Describe required properties and regname-supply.
> regname-supply is required when bypass mode is used for a regulator.
> Describes regulator topology.
>
> Signed-off-by: Jerome NEANNE <jneanne@xxxxxxxxxxxx>
> ---
> .../bindings/regulator/ti,tps65219.yaml | 146 ++++++++++++++++++
> 1 file changed, 146 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/regulator/ti,tps65219.yaml
>
> diff --git a/Documentation/devicetree/bindings/regulator/ti,tps65219.yaml b/Documentation/devicetree/bindings/regulator/ti,tps65219.yaml
> new file mode 100644
> index 000000000000..a4717ff4e95b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/regulator/ti,tps65219.yaml
> @@ -0,0 +1,146 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/regulator/ti,tps65219.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: TI tps65219 Power Management Integrated Circuit regulators
> +
> +maintainers:
> + - Jerome Neanne <jerome.neanne@xxxxxxxxxxxx>
> +
> +description: |
> + Regulator nodes should be named to buck<number> and ldo<number>.
> +
> +properties:
> + compatible:
> + enum:
> + - ti,tps65219
> +
> + reg:
> + maxItems: 1
> +
> +patternProperties:
> + "^buck[1-3]-supply$":
> + description: Input supply phandle of one regulator.
> +
> + "^ldo[1-4]-supply$":
> + description: Input supply phandle of one regulator.
> +
> + regulators:
> + type: object
> + description: |
> + list of regulators provided by this controller
> +
> + patternProperties:
> + "^ldo[1-4]$":
> + type: object
> + $ref: regulator.yaml#
> + description:
> + Properties for single LDO regulator.
> +
> + properties:
> + regulator-name:
> + pattern: "^VDD[A-Z0-9_]+$"
> + description:
> + should be "VDDNAME_LDO1", ..., "VDDNAMELDO4"
> +
> + unevaluatedProperties: false

For the indented cases of this it's more readable when 'properties' gets
long to put these next to 'type' or '$ref'.

Either way,

Reviewed-by: Rob Herring <robh@xxxxxxxxxx>