[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <57ae63a2-544b-4241-a54d-8fa9917c1e44@mleia.com>
Date: Wed, 12 Mar 2025 19:59:21 +0200
From: Vladimir Zapolskiy <vz@...ia.com>
To: Purva Yeshi <purvayeshi550@...il.com>, ukleinek@...nel.org,
robh@...nel.org, krzk+dt@...nel.org, conor+dt@...nel.org,
piotr.wojtaszczyk@...esys.com
Cc: linux-pwm@...r.kernel.org, devicetree@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] dt-bindings: pwm: Convert lpc32xx-pwm.txt to YAML
Hello Purva.
Thank you for your contribution.
On 3/12/25 14:27, Purva Yeshi wrote:
> Convert the existing `lpc32xx-pwm.txt` bindings documentation into a
> YAML schema (`nxp,lpc3220-pwm.yaml`).
>
> Set `"#pwm-cells"` to `const: 3` for expected PWM cell properties.
Actually it shall be set to 1.
>
> Signed-off-by: Purva Yeshi <purvayeshi550@...il.com>
> ---
> V1 - https://lore.kernel.org/all/20250311125756.24064-1-purvayeshi550@gmail.com/
> V2 - Correct filename to match the compatible string, remove unnecessary
> quotes in maintainers, and refine commit message.
>
> .../devicetree/bindings/pwm/lpc32xx-pwm.txt | 17 ---------
> .../bindings/pwm/nxp,lpc3220-pwm.yaml | 38 +++++++++++++++++++
> 2 files changed, 38 insertions(+), 17 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/pwm/lpc32xx-pwm.txt
> create mode 100644 Documentation/devicetree/bindings/pwm/nxp,lpc3220-pwm.yaml
>
> diff --git a/Documentation/devicetree/bindings/pwm/lpc32xx-pwm.txt b/Documentation/devicetree/bindings/pwm/lpc32xx-pwm.txt
> deleted file mode 100644
> index 74b5bc5dd..000000000
> --- a/Documentation/devicetree/bindings/pwm/lpc32xx-pwm.txt
> +++ /dev/null
> @@ -1,17 +0,0 @@
> -LPC32XX PWM controller
> -
> -Required properties:
> -- compatible: should be "nxp,lpc3220-pwm"
> -- reg: physical base address and length of the controller's registers
> -
> -Examples:
> -
> -pwm@...5c000 {
> - compatible = "nxp,lpc3220-pwm";
> - reg = <0x4005c000 0x4>;
> -};
> -
> -pwm@...5c004 {
> - compatible = "nxp,lpc3220-pwm";
> - reg = <0x4005c004 0x4>;
> -};
> diff --git a/Documentation/devicetree/bindings/pwm/nxp,lpc3220-pwm.yaml b/Documentation/devicetree/bindings/pwm/nxp,lpc3220-pwm.yaml
> new file mode 100644
> index 000000000..432a5e9d4
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/pwm/nxp,lpc3220-pwm.yaml
> @@ -0,0 +1,38 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/pwm/nxp,lpc3220-pwm.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: LPC32XX PWM controller
> +
> +maintainers:
> + - Vladimir Zapolskiy <vz@...ia.com>
> + - Piotr Wojtaszczyk <piotr.wojtaszczyk@...esys.com>
> +
> +allOf:
> + - $ref: pwm.yaml#
> +
> +properties:
> + compatible:
> + const: nxp,lpc3220-pwm
> +
> + reg:
> + maxItems: 1
> +
> + "#pwm-cells":
> + const: 3
It shall be 1.
> +
> +required:
> + - compatible
> + - reg
> +
There is an error in the original lpc32xx-pwm.txt file, one more property
"clocks" is strictly required, please add it along with the conversion.
Thank you!
> +unevaluatedProperties: false
> +
> +examples:
> + - |
> + pwm@...5c000 {
> + compatible = "nxp,lpc3220-pwm";
> + reg = <0x4005c000 0x4>;
> + #pwm-cells = <3>;
> + };
--
Best wishes,
Vladimir
Powered by blists - more mailing lists