* [PATCH] dt-bindings: pwm: Convert mxs pwm to json-schema
@ 2020-05-14 11:41 Anson Huang
2020-05-18 5:21 ` Aisheng Dong
2020-05-28 15:17 ` Rob Herring
0 siblings, 2 replies; 5+ messages in thread
From: Anson Huang @ 2020-05-14 11:41 UTC (permalink / raw)
To: thierry.reding, u.kleine-koenig, robh+dt, shawnguo, s.hauer,
kernel, festevam, linux-pwm, devicetree, linux-arm-kernel,
linux-kernel
Cc: Linux-imx
Convert the mxs pwm binding to DT schema format using json-schema.
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
---
Documentation/devicetree/bindings/pwm/mxs-pwm.txt | 17 ---------
Documentation/devicetree/bindings/pwm/mxs-pwm.yaml | 43 ++++++++++++++++++++++
2 files changed, 43 insertions(+), 17 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/pwm/mxs-pwm.txt
create mode 100644 Documentation/devicetree/bindings/pwm/mxs-pwm.yaml
diff --git a/Documentation/devicetree/bindings/pwm/mxs-pwm.txt b/Documentation/devicetree/bindings/pwm/mxs-pwm.txt
deleted file mode 100644
index a1b8a48..0000000
--- a/Documentation/devicetree/bindings/pwm/mxs-pwm.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-Freescale MXS PWM controller
-
-Required properties:
-- compatible: should be "fsl,imx23-pwm"
-- reg: physical base address and length of the controller's registers
-- #pwm-cells: should be 3. See pwm.yaml in this directory for a description of
- the cells format.
-- fsl,pwm-number: the number of PWM devices
-
-Example:
-
-pwm: pwm@80064000 {
- compatible = "fsl,imx28-pwm", "fsl,imx23-pwm";
- reg = <0x80064000 0x2000>;
- #pwm-cells = <3>;
- fsl,pwm-number = <8>;
-};
diff --git a/Documentation/devicetree/bindings/pwm/mxs-pwm.yaml b/Documentation/devicetree/bindings/pwm/mxs-pwm.yaml
new file mode 100644
index 0000000..da68f4a
--- /dev/null
+++ b/Documentation/devicetree/bindings/pwm/mxs-pwm.yaml
@@ -0,0 +1,43 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pwm/mxs-pwm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Freescale MXS PWM controller
+
+maintainers:
+ - Shawn Guo <shawn.guo@linaro.org>
+ - Anson Huang <anson.huang@nxp.com>
+
+properties:
+ compatible:
+ enum:
+ - fsl,imx23-pwm
+
+ reg:
+ maxItems: 1
+
+ "#pwm-cells":
+ const: 3
+
+ fsl,pwm-number:
+ $ref: '/schemas/types.yaml#/definitions/uint32'
+ description: u32 value representing the number of PWM devices
+
+required:
+ - compatible
+ - reg
+ - "#pwm-cells"
+ - fsl,pwm-number
+
+additionalProperties: false
+
+examples:
+ - |
+ pwm@80064000 {
+ compatible = "fsl,imx23-pwm";
+ reg = <0x80064000 0x2000>;
+ #pwm-cells = <3>;
+ fsl,pwm-number = <8>;
+ };
--
2.7.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 5+ messages in thread
* RE: [PATCH] dt-bindings: pwm: Convert mxs pwm to json-schema
2020-05-14 11:41 [PATCH] dt-bindings: pwm: Convert mxs pwm to json-schema Anson Huang
@ 2020-05-18 5:21 ` Aisheng Dong
2020-05-18 5:31 ` Anson Huang
2020-05-28 15:17 ` Rob Herring
1 sibling, 1 reply; 5+ messages in thread
From: Aisheng Dong @ 2020-05-18 5:21 UTC (permalink / raw)
To: Anson Huang, thierry.reding, u.kleine-koenig, robh+dt, shawnguo,
s.hauer, kernel, festevam, linux-pwm, devicetree,
linux-arm-kernel, linux-kernel
Cc: dl-linux-imx
> +title: Freescale MXS PWM controller
> +
> +maintainers:
> + - Shawn Guo <shawn.guo@linaro.org>
> + - Anson Huang <anson.huang@nxp.com>
> +
> +properties:
> + compatible:
> + enum:
> + - fsl,imx23-pwm
> +
> + reg:
> + maxItems: 1
> +
> + "#pwm-cells":
> + const: 3
Seems you missed the reference to pwm.yaml.
Regards
Aisheng
> +
> + fsl,pwm-number:
> + $ref: '/schemas/types.yaml#/definitions/uint32'
> + description: u32 value representing the number of PWM devices
> +
> +required:
> + - compatible
> + - reg
> + - "#pwm-cells"
> + - fsl,pwm-number
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + pwm@80064000 {
> + compatible = "fsl,imx23-pwm";
> + reg = <0x80064000 0x2000>;
> + #pwm-cells = <3>;
> + fsl,pwm-number = <8>;
> + };
> --
> 2.7.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] dt-bindings: pwm: Convert mxs pwm to json-schema
2020-05-18 5:21 ` Aisheng Dong
@ 2020-05-18 5:31 ` Anson Huang
2020-05-18 6:07 ` Aisheng Dong
0 siblings, 1 reply; 5+ messages in thread
From: Anson Huang @ 2020-05-18 5:31 UTC (permalink / raw)
To: Aisheng Dong, thierry.reding, u.kleine-koenig, robh+dt, shawnguo,
s.hauer, kernel, festevam, linux-pwm, devicetree,
linux-arm-kernel, linux-kernel
Cc: dl-linux-imx
> Subject: RE: [PATCH] dt-bindings: pwm: Convert mxs pwm to json-schema
>
> > +title: Freescale MXS PWM controller
> > +
> > +maintainers:
> > + - Shawn Guo <shawn.guo@linaro.org>
> > + - Anson Huang <anson.huang@nxp.com>
> > +
> > +properties:
> > + compatible:
> > + enum:
> > + - fsl,imx23-pwm
> > +
> > + reg:
> > + maxItems: 1
> > +
> > + "#pwm-cells":
> > + const: 3
>
> Seems you missed the reference to pwm.yaml.
It is because many pwm yaml files also has no "#pwm-cells" reference, so I
am NOT sure if it is a MUST:
Documentation/devicetree/bindings/pwm/allwinner,sun4i-a10-pwm.yaml
Documentation/devicetree/bindings/pwm/google,cros-ec-pwm.yaml
Documentation/devicetree/bindings/pwm/iqs620a-pwm.yaml
...
Anson
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] dt-bindings: pwm: Convert mxs pwm to json-schema
2020-05-18 5:31 ` Anson Huang
@ 2020-05-18 6:07 ` Aisheng Dong
0 siblings, 0 replies; 5+ messages in thread
From: Aisheng Dong @ 2020-05-18 6:07 UTC (permalink / raw)
To: Anson Huang, thierry.reding, u.kleine-koenig, robh+dt, shawnguo,
s.hauer, kernel, festevam, linux-pwm, devicetree,
linux-arm-kernel, linux-kernel
Cc: dl-linux-imx
> From: Anson Huang <anson.huang@nxp.com>
> Sent: Monday, May 18, 2020 1:32 PM
>
> > Subject: RE: [PATCH] dt-bindings: pwm: Convert mxs pwm to json-schema
> >
> > > +title: Freescale MXS PWM controller
> > > +
> > > +maintainers:
> > > + - Shawn Guo <shawn.guo@linaro.org>
> > > + - Anson Huang <anson.huang@nxp.com>
> > > +
> > > +properties:
> > > + compatible:
> > > + enum:
> > > + - fsl,imx23-pwm
> > > +
> > > + reg:
> > > + maxItems: 1
> > > +
> > > + "#pwm-cells":
> > > + const: 3
> >
> > Seems you missed the reference to pwm.yaml.
>
> It is because many pwm yaml files also has no "#pwm-cells" reference, so I am
> NOT sure if it is a MUST:
>
> Documentation/devicetree/bindings/pwm/allwinner,sun4i-a10-pwm.yaml
> Documentation/devicetree/bindings/pwm/google,cros-ec-pwm.yaml
> Documentation/devicetree/bindings/pwm/iqs620a-pwm.yaml
> ...
I guess we'd better add it.
Let's wait for Rob's feedback.
Regards
Aisheng
>
> Anson
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] dt-bindings: pwm: Convert mxs pwm to json-schema
2020-05-14 11:41 [PATCH] dt-bindings: pwm: Convert mxs pwm to json-schema Anson Huang
2020-05-18 5:21 ` Aisheng Dong
@ 2020-05-28 15:17 ` Rob Herring
1 sibling, 0 replies; 5+ messages in thread
From: Rob Herring @ 2020-05-28 15:17 UTC (permalink / raw)
To: Anson Huang
Cc: linux-pwm, devicetree, shawnguo, s.hauer, linux-kernel, robh+dt,
thierry.reding, Linux-imx, kernel, u.kleine-koenig, festevam,
linux-arm-kernel
On Thu, 14 May 2020 19:41:10 +0800, Anson Huang wrote:
> Convert the mxs pwm binding to DT schema format using json-schema.
>
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> ---
> Documentation/devicetree/bindings/pwm/mxs-pwm.txt | 17 ---------
> Documentation/devicetree/bindings/pwm/mxs-pwm.yaml | 43 ++++++++++++++++++++++
> 2 files changed, 43 insertions(+), 17 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/pwm/mxs-pwm.txt
> create mode 100644 Documentation/devicetree/bindings/pwm/mxs-pwm.yaml
>
Applied, thanks!
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-05-28 15:18 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-14 11:41 [PATCH] dt-bindings: pwm: Convert mxs pwm to json-schema Anson Huang
2020-05-18 5:21 ` Aisheng Dong
2020-05-18 5:31 ` Anson Huang
2020-05-18 6:07 ` Aisheng Dong
2020-05-28 15:17 ` 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).