Linux-ide Archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: imx-pata: Convert to dtschema
@ 2024-03-01 17:47 Animesh Agarwal
  2024-03-01 19:30 ` Rob Herring
  2024-03-01 19:33 ` Krzysztof Kozlowski
  0 siblings, 2 replies; 7+ messages in thread
From: Animesh Agarwal @ 2024-03-01 17:47 UTC (permalink / raw
  Cc: dlemoal, Animesh Agarwal, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, NXP Linux Team, linux-ide, devicetree,
	linux-arm-kernel, linux-kernel

Convert the imx-pata bindings to DT schema.

Signed-off-by: Animesh Agarwal <animeshagarwal28@gmail.com>
---
 .../devicetree/bindings/ata/imx-pata.txt      | 16 ---------
 .../devicetree/bindings/ata/imx-pata.yaml     | 34 +++++++++++++++++++
 2 files changed, 34 insertions(+), 16 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/ata/imx-pata.txt
 create mode 100644 Documentation/devicetree/bindings/ata/imx-pata.yaml

diff --git a/Documentation/devicetree/bindings/ata/imx-pata.txt b/Documentation/devicetree/bindings/ata/imx-pata.txt
deleted file mode 100644
index f1172f00188a..000000000000
--- a/Documentation/devicetree/bindings/ata/imx-pata.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-* Freescale i.MX PATA Controller
-
-Required properties:
-- compatible: "fsl,imx27-pata"
-- reg: Address range of the PATA Controller
-- interrupts: The interrupt of the PATA Controller
-- clocks: the clocks for the PATA Controller
-
-Example:
-
-	pata: pata@83fe0000 {
-		compatible = "fsl,imx51-pata", "fsl,imx27-pata";
-		reg = <0x83fe0000 0x4000>;
-		interrupts = <70>;
-		clocks = <&clks 161>;
-	};
diff --git a/Documentation/devicetree/bindings/ata/imx-pata.yaml b/Documentation/devicetree/bindings/ata/imx-pata.yaml
new file mode 100644
index 000000000000..78a562587fb5
--- /dev/null
+++ b/Documentation/devicetree/bindings/ata/imx-pata.yaml
@@ -0,0 +1,34 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/ata/imx-pata.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Freescale i.MX PATA Controller
+
+maintainers:
+  - Animesh Agarwal <animeshagarwal28@gmail.com>
+
+properties:
+  compatible: 
+    enum:
+      - fsl,imx27
+  reg:
+    maxItems: 1
+  interrupts:
+    items:
+      - description: PATA Controller interrupts
+  clocks:
+    items:
+      - description: PATA Controller clocks
+
+additionalProperties: false
+
+examples:
+  - |
+    pata: pata@83fe0000 {
+        compatible = "fsl,imx51-pata", "fsl,imx27-pata";
+        reg = <0x83fe0000 0x4000>;
+        interrupts = <70>;
+        clocks = <&clks 161>;
+    };
-- 
2.44.0


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

* Re: [PATCH] dt-bindings: imx-pata: Convert to dtschema
  2024-03-01 17:47 [PATCH] dt-bindings: imx-pata: Convert to dtschema Animesh Agarwal
@ 2024-03-01 19:30 ` Rob Herring
  2024-03-01 19:33 ` Krzysztof Kozlowski
  1 sibling, 0 replies; 7+ messages in thread
From: Rob Herring @ 2024-03-01 19:30 UTC (permalink / raw
  To: Animesh Agarwal
  Cc: Pengutronix Kernel Team, dlemoal, Sascha Hauer, Fabio Estevam,
	Krzysztof Kozlowski, linux-kernel, linux-ide, Conor Dooley,
	Shawn Guo, linux-arm-kernel, Rob Herring, devicetree,
	NXP Linux Team


On Fri, 01 Mar 2024 23:17:21 +0530, Animesh Agarwal wrote:
> Convert the imx-pata bindings to DT schema.
> 
> Signed-off-by: Animesh Agarwal <animeshagarwal28@gmail.com>
> ---
>  .../devicetree/bindings/ata/imx-pata.txt      | 16 ---------
>  .../devicetree/bindings/ata/imx-pata.yaml     | 34 +++++++++++++++++++
>  2 files changed, 34 insertions(+), 16 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/ata/imx-pata.txt
>  create mode 100644 Documentation/devicetree/bindings/ata/imx-pata.yaml
> 

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
Documentation/devicetree/bindings/ata/imx-pata.example.dtb: /example-0/pata@83fe0000: failed to match any schema with compatible: ['fsl,imx51-pata', 'fsl,imx27-pata']
Documentation/devicetree/bindings/ata/imx-pata.example.dtb: /example-0/pata@83fe0000: failed to match any schema with compatible: ['fsl,imx51-pata', 'fsl,imx27-pata']

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240301174729.238869-1-animeshagarwal28@gmail.com

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.


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

* Re: [PATCH] dt-bindings: imx-pata: Convert to dtschema
  2024-03-01 17:47 [PATCH] dt-bindings: imx-pata: Convert to dtschema Animesh Agarwal
  2024-03-01 19:30 ` Rob Herring
@ 2024-03-01 19:33 ` Krzysztof Kozlowski
  2024-03-09 13:48   ` [PATCH v2] " Animesh
  1 sibling, 1 reply; 7+ messages in thread
From: Krzysztof Kozlowski @ 2024-03-01 19:33 UTC (permalink / raw
  To: Animesh Agarwal
  Cc: dlemoal, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, linux-ide, devicetree, linux-arm-kernel,
	linux-kernel

On 01/03/2024 18:47, Animesh Agarwal wrote:
> Convert the imx-pata bindings to DT schema.

It does not look like you tested the bindings, at least after quick
look. Please run `make dt_binding_check` (see
Documentation/devicetree/bindings/writing-schema.rst for instructions).
Maybe you need to update your dtschema and yamllint.

> 
> Signed-off-by: Animesh Agarwal <animeshagarwal28@gmail.com>
> ---
>  .../devicetree/bindings/ata/imx-pata.txt      | 16 ---------
>  .../devicetree/bindings/ata/imx-pata.yaml     | 34 +++++++++++++++++++

Filename like compatible, so fsl,imx27-pata.yaml

>  2 files changed, 34 insertions(+), 16 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/ata/imx-pata.txt
>  create mode 100644 Documentation/devicetree/bindings/ata/imx-pata.yaml
> 
> diff --git a/Documentation/devicetree/bindings/ata/imx-pata.txt b/Documentation/devicetree/bindings/ata/imx-pata.txt
> deleted file mode 100644
> index f1172f00188a..000000000000
> --- a/Documentation/devicetree/bindings/ata/imx-pata.txt
> +++ /dev/null
> @@ -1,16 +0,0 @@
> -* Freescale i.MX PATA Controller
> -
> -Required properties:
> -- compatible: "fsl,imx27-pata"
> -- reg: Address range of the PATA Controller
> -- interrupts: The interrupt of the PATA Controller
> -- clocks: the clocks for the PATA Controller
> -
> -Example:
> -
> -	pata: pata@83fe0000 {
> -		compatible = "fsl,imx51-pata", "fsl,imx27-pata";
> -		reg = <0x83fe0000 0x4000>;
> -		interrupts = <70>;
> -		clocks = <&clks 161>;
> -	};
> diff --git a/Documentation/devicetree/bindings/ata/imx-pata.yaml b/Documentation/devicetree/bindings/ata/imx-pata.yaml
> new file mode 100644
> index 000000000000..78a562587fb5
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/ata/imx-pata.yaml
> @@ -0,0 +1,34 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/ata/imx-pata.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Freescale i.MX PATA Controller
> +
> +maintainers:
> +  - Animesh Agarwal <animeshagarwal28@gmail.com>
> +
> +properties:
> +  compatible: 
> +    enum:
> +      - fsl,imx27

What are you documenting here?

> +  reg:
> +    maxItems: 1

Blank line

> +  interrupts:
> +    items:
> +      - description: PATA Controller interrupts

Blank line... just open example-schema or any other recent bindings
which were reviewed. Don't create entirely different style, but learn
from recent code.

> +  clocks:
> +    items:
> +      - description: PATA Controller clocks
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    pata: pata@83fe0000 {
> +        compatible = "fsl,imx51-pata", "fsl,imx27-pata";

And now please tell me how does it make sense with respect to your
compatible in this binding?

> +        reg = <0x83fe0000 0x4000>;
> +        interrupts = <70>;
> +        clocks = <&clks 161>;
> +    };

Best regards,
Krzysztof


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

* [PATCH v2] dt-bindings: imx-pata: Convert to dtschema
  2024-03-01 19:33 ` Krzysztof Kozlowski
@ 2024-03-09 13:48   ` Animesh
  2024-03-09 14:35     ` Fabio Estevam
  2024-03-09 15:23     ` Krzysztof Kozlowski
  0 siblings, 2 replies; 7+ messages in thread
From: Animesh @ 2024-03-09 13:48 UTC (permalink / raw
  Cc: dlemoal, Animesh, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, linux-ide, devicetree, linux-arm-kernel,
	linux-kernel

Convert the imx-pata bindings to DT schema.

Signed-off-by: Animesh <animeshagarwal28@gmail.com>
---
 .../devicetree/bindings/ata/fsl,imx-pata.yaml | 38 +++++++++++++++++++
 .../devicetree/bindings/ata/imx-pata.txt      | 16 --------
 2 files changed, 38 insertions(+), 16 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/ata/fsl,imx-pata.yaml
 delete mode 100644 Documentation/devicetree/bindings/ata/imx-pata.txt

diff --git a/Documentation/devicetree/bindings/ata/fsl,imx-pata.yaml b/Documentation/devicetree/bindings/ata/fsl,imx-pata.yaml
new file mode 100644
index 000000000000..ee7892bf963b
--- /dev/null
+++ b/Documentation/devicetree/bindings/ata/fsl,imx-pata.yaml
@@ -0,0 +1,38 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/ata/fsl,imx-pata.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Freescale i.MX PATA Controller
+
+maintainers:
+  - Animesh Agarwal <animeshagarwal28@gmail.com>
+
+properties:
+  compatible:
+    contains:
+      const: fsl,imx27-pata
+      
+  reg:
+    maxItems: 1
+
+  interrupts:
+    items:
+      - description: PATA Controller interrupts
+
+  clocks:
+    items:
+      - description: PATA Controller clocks
+
+additionalProperties: false
+
+examples:
+  - |
+    pata: pata@83fe0000 {
+        compatible = "fsl,imx51-pata", "fsl,imx27-pata";
+        reg = <0x83fe0000 0x4000>;
+        interrupts = <70>;
+        clocks = <&clks 161>;
+    };
+
diff --git a/Documentation/devicetree/bindings/ata/imx-pata.txt b/Documentation/devicetree/bindings/ata/imx-pata.txt
deleted file mode 100644
index f1172f00188a..000000000000
--- a/Documentation/devicetree/bindings/ata/imx-pata.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-* Freescale i.MX PATA Controller
-
-Required properties:
-- compatible: "fsl,imx27-pata"
-- reg: Address range of the PATA Controller
-- interrupts: The interrupt of the PATA Controller
-- clocks: the clocks for the PATA Controller
-
-Example:
-
-	pata: pata@83fe0000 {
-		compatible = "fsl,imx51-pata", "fsl,imx27-pata";
-		reg = <0x83fe0000 0x4000>;
-		interrupts = <70>;
-		clocks = <&clks 161>;
-	};
-- 
2.44.0


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

* Re: [PATCH v2] dt-bindings: imx-pata: Convert to dtschema
  2024-03-09 13:48   ` [PATCH v2] " Animesh
@ 2024-03-09 14:35     ` Fabio Estevam
       [not found]       ` <CAE3Oz80xEpdnUq6JkqXgf_LAM5dJP0TbCHkuPW-KzRVUD95FhA@mail.gmail.com>
  2024-03-09 15:23     ` Krzysztof Kozlowski
  1 sibling, 1 reply; 7+ messages in thread
From: Fabio Estevam @ 2024-03-09 14:35 UTC (permalink / raw
  To: Animesh
  Cc: dlemoal, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, NXP Linux Team,
	linux-ide, devicetree, linux-arm-kernel, linux-kernel

On Sat, Mar 9, 2024 at 10:48 AM Animesh <animeshagarwal28@gmail.com> wrote:

> +properties:
> +  compatible:
> +    contains:
> +      const: fsl,imx27-pata

You haven't documented fsl,imx51-pata.

> +examples:
> +  - |
> +    pata: pata@83fe0000 {
> +        compatible = "fsl,imx51-pata", "fsl,imx27-pata";

but it is present here...

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

* Re: [PATCH v2] dt-bindings: imx-pata: Convert to dtschema
       [not found]       ` <CAE3Oz80xEpdnUq6JkqXgf_LAM5dJP0TbCHkuPW-KzRVUD95FhA@mail.gmail.com>
@ 2024-03-09 14:51         ` Fabio Estevam
  0 siblings, 0 replies; 7+ messages in thread
From: Fabio Estevam @ 2024-03-09 14:51 UTC (permalink / raw
  To: Animesh Agarwal
  Cc: dlemoal, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, NXP Linux Team,
	linux-ide, devicetree, linux-arm-kernel, linux-kernel

On Sat, Mar 9, 2024 at 11:44 AM Animesh Agarwal
<animeshagarwal28@gmail.com> wrote:
>
> fsl,imx51-pata isn't present in the txt binding as well. Should i add it?

Yes, you need to add it and make sure to test it with 'make dt_binding_check'.

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

* Re: [PATCH v2] dt-bindings: imx-pata: Convert to dtschema
  2024-03-09 13:48   ` [PATCH v2] " Animesh
  2024-03-09 14:35     ` Fabio Estevam
@ 2024-03-09 15:23     ` Krzysztof Kozlowski
  1 sibling, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2024-03-09 15:23 UTC (permalink / raw
  To: Animesh
  Cc: dlemoal, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, linux-ide, devicetree, linux-arm-kernel,
	linux-kernel

On 09/03/2024 14:48, Animesh wrote:
> Convert the imx-pata bindings to DT schema.
> 
> Signed-off-by: Animesh <animeshagarwal28@gmail.com>

Do not attach (thread) your patchsets to some other threads (unrelated
or older versions). This buries them deep in the mailbox and might
interfere with applying entire sets.

> ---

Where is the changelog? What happened here? What changed?


>  .../devicetree/bindings/ata/fsl,imx-pata.yaml | 38 +++++++++++++++++++
>  .../devicetree/bindings/ata/imx-pata.txt      | 16 --------
>  2 files changed, 38 insertions(+), 16 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/ata/fsl,imx-pata.yaml
>  delete mode 100644 Documentation/devicetree/bindings/ata/imx-pata.txt
> 
> diff --git a/Documentation/devicetree/bindings/ata/fsl,imx-pata.yaml b/Documentation/devicetree/bindings/ata/fsl,imx-pata.yaml
> new file mode 100644
> index 000000000000..ee7892bf963b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/ata/fsl,imx-pata.yaml
> @@ -0,0 +1,38 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/ata/fsl,imx-pata.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Freescale i.MX PATA Controller
> +
> +maintainers:
> +  - Animesh Agarwal <animeshagarwal28@gmail.com>
> +
> +properties:
> +  compatible:
> +    contains:
> +      const: fsl,imx27-pata
> +      
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    items:
> +      - description: PATA Controller interrupts
> +
> +  clocks:
> +    items:
> +      - description: PATA Controller clocks
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    pata: pata@83fe0000 {
> +        compatible = "fsl,imx51-pata", "fsl,imx27-pata";


The same problem as before. How did you resolve test failure?

Best regards,
Krzysztof


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

end of thread, other threads:[~2024-03-09 15:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-01 17:47 [PATCH] dt-bindings: imx-pata: Convert to dtschema Animesh Agarwal
2024-03-01 19:30 ` Rob Herring
2024-03-01 19:33 ` Krzysztof Kozlowski
2024-03-09 13:48   ` [PATCH v2] " Animesh
2024-03-09 14:35     ` Fabio Estevam
     [not found]       ` <CAE3Oz80xEpdnUq6JkqXgf_LAM5dJP0TbCHkuPW-KzRVUD95FhA@mail.gmail.com>
2024-03-09 14:51         ` Fabio Estevam
2024-03-09 15:23     ` Krzysztof Kozlowski

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 read-only IMAP folder(s) and NNTP newsgroup(s).