linux-pwm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: pwm: brcm,iproc-pwm: convert to the json-schema
@ 2021-05-12 16:02 Rafał Miłecki
  2021-05-18  1:06 ` Rob Herring
  0 siblings, 1 reply; 2+ messages in thread
From: Rafał Miłecki @ 2021-05-12 16:02 UTC (permalink / raw)
  To: Thierry Reding, Uwe Kleine-König, Lee Jones, Rob Herring,
	Florian Fainelli
  Cc: Ray Jui, Scott Branden, bcm-kernel-feedback-list, linux-pwm,
	devicetree, linux-arm-kernel, Rafał Miłecki

From: Rafał Miłecki <rafal@milecki.pl>

This helps validating DTS files.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
 .../bindings/pwm/brcm,iproc-pwm.txt           | 21 ---------
 .../bindings/pwm/brcm,iproc-pwm.yaml          | 45 +++++++++++++++++++
 2 files changed, 45 insertions(+), 21 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/pwm/brcm,iproc-pwm.txt
 create mode 100644 Documentation/devicetree/bindings/pwm/brcm,iproc-pwm.yaml

diff --git a/Documentation/devicetree/bindings/pwm/brcm,iproc-pwm.txt b/Documentation/devicetree/bindings/pwm/brcm,iproc-pwm.txt
deleted file mode 100644
index 655f6cd4ef46..000000000000
--- a/Documentation/devicetree/bindings/pwm/brcm,iproc-pwm.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-Broadcom iProc PWM controller device tree bindings
-
-This controller has 4 channels.
-
-Required Properties :
-- compatible: must be "brcm,iproc-pwm"
-- reg: physical base address and length of the controller's registers
-- clocks: phandle + clock specifier pair for the external clock
-- #pwm-cells: Should be 3. See pwm.yaml in this directory for a
-  description of the cells format.
-
-Refer to clocks/clock-bindings.txt for generic clock consumer properties.
-
-Example:
-
-pwm: pwm@18031000 {
-	compatible = "brcm,iproc-pwm";
-	reg = <0x18031000 0x28>;
-	clocks = <&osc>;
-	#pwm-cells = <3>;
-};
diff --git a/Documentation/devicetree/bindings/pwm/brcm,iproc-pwm.yaml b/Documentation/devicetree/bindings/pwm/brcm,iproc-pwm.yaml
new file mode 100644
index 000000000000..218ab06c34d1
--- /dev/null
+++ b/Documentation/devicetree/bindings/pwm/brcm,iproc-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/brcm,iproc-pwm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom iProc PWM controller
+
+maintainers:
+  - Rafał Miłecki <rafal@milecki.pl>
+
+description:
+  This controller has 4 channels.
+
+allOf:
+  - $ref: pwm.yaml#
+
+properties:
+  compatible:
+    const: brcm,iproc-pwm
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    description: external clock
+    maxItems: 1
+
+  "#pwm-cells":
+    const: 3
+
+unevaluatedProperties: false
+
+required:
+  - reg
+  - clocks
+
+examples:
+  - |
+    pwm@18031000 {
+        compatible = "brcm,iproc-pwm";
+        reg = <0x18031000 0x28>;
+        clocks = <&osc>;
+        #pwm-cells = <3>;
+    };
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] dt-bindings: pwm: brcm,iproc-pwm: convert to the json-schema
  2021-05-12 16:02 [PATCH] dt-bindings: pwm: brcm,iproc-pwm: convert to the json-schema Rafał Miłecki
@ 2021-05-18  1:06 ` Rob Herring
  0 siblings, 0 replies; 2+ messages in thread
From: Rob Herring @ 2021-05-18  1:06 UTC (permalink / raw)
  To: Rafał Miłecki
  Cc: Rob Herring, Thierry Reding, Florian Fainelli,
	Uwe Kleine-König, Lee Jones, linux-arm-kernel, Ray Jui,
	Rafał Miłecki, devicetree, bcm-kernel-feedback-list,
	linux-pwm, Scott Branden

On Wed, 12 May 2021 18:02:53 +0200, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> This helps validating DTS files.
> 
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
> ---
>  .../bindings/pwm/brcm,iproc-pwm.txt           | 21 ---------
>  .../bindings/pwm/brcm,iproc-pwm.yaml          | 45 +++++++++++++++++++
>  2 files changed, 45 insertions(+), 21 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/pwm/brcm,iproc-pwm.txt
>  create mode 100644 Documentation/devicetree/bindings/pwm/brcm,iproc-pwm.yaml
> 

Applied, thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-18  1:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-12 16:02 [PATCH] dt-bindings: pwm: brcm,iproc-pwm: convert to the json-schema Rafał Miłecki
2021-05-18  1:06 ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).