From: Purva Yeshi <purvayeshi550@gmail.com>
To: ukleinek@kernel.org, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org, vz@mleia.com, piotr.wojtaszczyk@timesys.com
Cc: linux-pwm@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Purva Yeshi <purvayeshi550@gmail.com>
Subject: [PATCH] dt-bindings: pwm: Convert lpc32xx-pwm.txt to YAML schema
Date: Tue, 11 Mar 2025 18:27:56 +0530 [thread overview]
Message-ID: <20250311125756.24064-1-purvayeshi550@gmail.com> (raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=y, Size: 2214 bytes --]
Convert the existing `lpc32xx-pwm.txt` bindings documentation into a
YAML schema (`lpc32xx-pwm.yaml`).
Changes:
Add SPDX license identifier `(GPL-2.0-only OR BSD-2-Clause)`.
Define `$id` and `$schema` fields for proper schema validation.
Set `title` to describe the LPC32XX PWM controller.
Add maintainers as per `scripts/get_maintainer.pl` output.
Reference `pwm.yaml#` in `allOf` to inherit common PWM properties.
Define properties:
Restrict `compatible` to `"nxp,lpc3220-pwm"` using `const`.
Limit `reg` to `maxItems: 1` to ensure a single register range.
Set `"#pwm-cells"` to `const: 3` for expected PWM cell properties.
Mark `compatible` and `reg` as required properties.
Set `unevaluatedProperties: false` to enforce strict validation.
Validate the YAML schema using dt-validate and yamllint.
Signed-off-by: Purva Yeshi <purvayeshi550@gmail.com>
---
.../devicetree/bindings/pwm/lpc32xx-pwm.yaml | 45 +++++++++++++++++++
1 file changed, 45 insertions(+)
create mode 100644 Documentation/devicetree/bindings/pwm/lpc32xx-pwm.yaml
diff --git a/Documentation/devicetree/bindings/pwm/lpc32xx-pwm.yaml b/Documentation/devicetree/bindings/pwm/lpc32xx-pwm.yaml
new file mode 100644
index 000000000..3e41cd291
--- /dev/null
+++ b/Documentation/devicetree/bindings/pwm/lpc32xx-pwm.yaml
@@ -0,0 +1,45 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pwm/nxp,lpc32xx-pwm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: LPC32XX PWM controller
+
+maintainers:
+ - "Uwe Kleine-König <ukleinek@kernel.org>"
+ - "Vladimir Zapolskiy <vz@mleia.com>"
+ - "Piotr Wojtaszczyk <piotr.wojtaszczyk@timesys.com>"
+
+allOf:
+ - $ref: pwm.yaml#
+
+properties:
+ compatible:
+ const: nxp,lpc3220-pwm
+
+ reg:
+ maxItems: 1
+
+ "#pwm-cells":
+ const: 3
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ pwm@4005c000 {
+ compatible = "nxp,lpc3220-pwm";
+ reg = <0x4005c000 0x4>;
+ #pwm-cells = <3>;
+ };
+ - |
+ pwm@4005c004 {
+ compatible = "nxp,lpc3220-pwm";
+ reg = <0x4005c004 0x4>;
+ #pwm-cells = <3>;
+ };
--
2.34.1
next reply other threads:[~2025-03-11 13:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-11 12:57 Purva Yeshi [this message]
2025-03-11 13:22 ` [PATCH] dt-bindings: pwm: Convert lpc32xx-pwm.txt to YAML schema Krzysztof Kozlowski
2025-03-11 14:55 ` Purva Yeshi
2025-03-11 15:14 ` Krzysztof Kozlowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250311125756.24064-1-purvayeshi550@gmail.com \
--to=purvayeshi550@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=piotr.wojtaszczyk@timesys.com \
--cc=robh@kernel.org \
--cc=ukleinek@kernel.org \
--cc=vz@mleia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox