2024-03-10 05:20:02

by Animesh Agarwal

[permalink] [raw]
Subject: [PATCH v4] dt-bindings: imx-pata: Convert to dtschema

Convert the imx-pata bindings to DT schema.

Signed-off-by: Animesh Agarwal <[email protected]>

---
Changes in v4:
- added fsl,imx31-pata in compatible property
- imx51-pata was not defined as compatible in txt bindings, adding imx51-pata ensures this node compiles to imx31.dtsi
Changes in v3:
- added fsl,imx51-pata in compatible property
- imx51-pata was not defined as compatible in txt bindings, adding imx51-pata ensures this node compiles to imx51.dtsi
Changes in v2:
- fixed style issues
- compatible property now matches the examples
- fixed yamllint warnings/errors
---
---
.../devicetree/bindings/ata/fsl,imx-pata.yaml | 41 +++++++++++++++++++
.../devicetree/bindings/ata/imx-pata.txt | 16 --------
2 files changed, 41 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..aa0174844eb1
--- /dev/null
+++ b/Documentation/devicetree/bindings/ata/fsl,imx-pata.yaml
@@ -0,0 +1,41 @@
+# 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 <[email protected]>
+
+properties:
+ compatible:
+ items:
+ - enum:
+ - fsl,imx31-pata
+ - fsl,imx51-pata
+ - 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



2024-03-10 07:51:43

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v4] dt-bindings: imx-pata: Convert to dtschema

On 10/03/2024 06:19, Animesh Agarwal wrote:
> Convert the imx-pata bindings to DT schema.
>
> Signed-off-by: Animesh Agarwal <[email protected]>
>
> ---
> Changes in v4:
> - added fsl,imx31-pata in compatible property
> - imx51-pata was not defined as compatible in txt bindings, adding imx51-pata ensures this node compiles to imx31.dtsi
> Changes in v3:
> - added fsl,imx51-pata in compatible property
> - imx51-pata was not defined as compatible in txt bindings, adding imx51-pata ensures this node compiles to imx51.dtsi
> Changes in v2:
> - fixed style issues
> - compatible property now matches the examples
> - fixed yamllint warnings/errors
> ---
> ---
> .../devicetree/bindings/ata/fsl,imx-pata.yaml | 41 +++++++++++++++++++
> .../devicetree/bindings/ata/imx-pata.txt | 16 --------
> 2 files changed, 41 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..aa0174844eb1
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/ata/fsl,imx-pata.yaml
> @@ -0,0 +1,41 @@
> +# 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 <[email protected]>
> +
> +properties:
> + compatible:
> + items:
> + - enum:
> + - fsl,imx31-pata
> + - fsl,imx51-pata
> + - const: fsl,imx27-pata
> +

How did you resolve my comment about imx27?

Best regards,
Krzysztof


2024-03-10 08:12:10

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v4] dt-bindings: imx-pata: Convert to dtschema

On 10/03/2024 09:03, Animesh Agarwal wrote:
> 'enum' is applied in a list compatibles which is equivalent to 'oneOf'.
> Followed by 'const: fsl,imx27-pata' ensuring 1 enum and 1 const value
> matches.
>
> Should I use oneOf instead?

Why don't you respond to the comment?

Also, you ignored my other comments. No, that is not how it works. Go
and respond to each of them and answer how did you implement the
solution to my comment.

Best regards,
Krzysztof