diff mbox series

[v3] dt-bindings: imx-pata: Convert to dtschema

Message ID 20240309160741.54096-1-animeshagarwal28@gmail.com
State Superseded, archived
Headers show
Series [v3] dt-bindings: imx-pata: Convert to dtschema | expand

Checks

Context Check Description
robh/checkpatch warning total: 0 errors, 1 warnings, 40 lines checked
robh/patch-applied success
robh/dtbs-check warning build log
robh/dt-meta-schema success

Commit Message

Animesh Agarwal March 9, 2024, 4:07 p.m. UTC
Convert the imx-pata bindings to DT schema.

Signed-off-by: Animesh Agarwal <animeshagarwal28@gmail.com>
---
Changes in v3:
- added fsl,imx51-pata in compatible property

Changes in v2:
- fixed style issues
- compatible property now matches the examples
- fixed yamllint warnings/errors
---
 .../devicetree/bindings/ata/fsl,imx-pata.yaml | 40 +++++++++++++++++++
 .../devicetree/bindings/ata/imx-pata.txt      | 16 --------
 2 files changed, 40 insertions(+), 16 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/ata/fsl,imx-pata.yaml
 delete mode 100644 Documentation/devicetree/bindings/ata/imx-pata.txt

Comments

Krzysztof Kozlowski March 9, 2024, 6:08 p.m. UTC | #1
On 09/03/2024 17:07, Animesh Agarwal wrote:
> Convert the imx-pata bindings to DT schema.
> 
> Signed-off-by: Animesh Agarwal <animeshagarwal28@gmail.com>
> ---
> Changes in v3:
> - added fsl,imx51-pata in compatible property

Please explain the differences done during conversion in the commit msg.
There was no imx51 compatible in the binding before.

> 
> Changes in v2:
> - fixed style issues
> - compatible property now matches the examples
> - fixed yamllint warnings/errors
> ---
>  .../devicetree/bindings/ata/fsl,imx-pata.yaml | 40 +++++++++++++++++++
>  .../devicetree/bindings/ata/imx-pata.txt      | 16 --------
>  2 files changed, 40 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..265ea80434e1
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/ata/fsl,imx-pata.yaml
> @@ -0,0 +1,40 @@
> +# 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:
> +    items:
> +      - enum:
> +          - fsl,imx51-pata
> +      - const: fsl,imx27-pata

This allows only imx51 and disallows imx27 alone, which is not what old
bindings were saying.

The best if you just test it on DTS. Please run `make dtbs_check W=1`
(see Documentation/devicetree/bindings/writing-schema.rst or
https://www.linaro.org/blog/tips-and-tricks-for-validating-devicetree-sources-with-the-devicetree-schema/
for instructions).

You should see two warnings for imx31 and imx51. You need imx31 as well
(and changes against pure conversion should be mentioned in commit msg).


Best regards,
Krzysztof
Krzysztof Kozlowski March 10, 2024, 1:07 p.m. UTC | #2
On 10/03/2024 12:52, Animesh Agarwal wrote:
> Ok noted,
> 
> I have now included the explanation.
> 
> Added imx31 in the next patch and tested. Changes of the conversion are now
> mentioned in the next patch.

Please respond inline, instead of top-posting, because it makes your
emails hard to follow.
https://elixir.bootlin.com/linux/v6.8-rc7/source/Documentation/process/submitting-patches.rst#L340


> 
> On Sat, Mar 9, 2024 at 11:38 PM Krzysztof Kozlowski <
> krzysztof.kozlowski@linaro.org> wrote:
> 
>> On 09/03/2024 17:07, Animesh Agarwal wrote:
>>> Convert the imx-pata bindings to DT schema.
>>>
>>> Signed-off-by: Animesh Agarwal <animeshagarwal28@gmail.com>
>>> ---
>>> Changes in v3:
>>> - added fsl,imx51-pata in compatible property
>>
>> Please explain the differences done during conversion in the commit msg.

How did you solve this?

>> There was no imx51 compatible in the binding before.
>>
>>>
>>> Changes in v2:
>>> - fixed style issues
>>> - compatible property now matches the examples
>>> - fixed yamllint warnings/errors
>>> ---
>>>  .../devicetree/bindings/ata/fsl,imx-pata.yaml | 40 +++++++++++++++++++
>>>  .../devicetree/bindings/ata/imx-pata.txt      | 16 --------
>>>  2 files changed, 40 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..265ea80434e1
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/ata/fsl,imx-pata.yaml
>>> @@ -0,0 +1,40 @@
>>> +# 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:
>>> +    items:
>>> +      - enum:
>>> +          - fsl,imx51-pata
>>> +      - const: fsl,imx27-pata
>>
>> This allows only imx51 and disallows imx27 alone, which is not what old
------------------------------^^^^^^^^^^^^^^^^^^^^^
How did you solve this?

>> bindings were saying.


>>
>> The best if you just test it on DTS. Please run `make dtbs_check W=1`
>> (see Documentation/devicetree/bindings/writing-schema.rst or
>>
>> https://www.linaro.org/blog/tips-and-tricks-for-validating-devicetree-sources-with-the-devicetree-schema/
>> for instructions).
>>
>> You should see two warnings for imx31 and imx51. You need imx31 as well
>> (and changes against pure conversion should be mentioned in commit msg).

----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

How did you solve this?


Best regards,
Krzysztof
Krzysztof Kozlowski March 10, 2024, 2:34 p.m. UTC | #3
On 10/03/2024 14:36, Animesh Agarwal wrote:
> On 10/03/2024 at 18:37 Krzysztof Kozlowski wrote:
>> Please respond inline, instead of top-posting, because it makes your
>> emails hard to follow.
>>
> https://elixir.bootlin.com/linux/v6.8-rc7/source/Documentation/process/submitting-patches.rst#L340
> <https://elixir.bootlin.com/linux/v6.8-rc7/source/Documentation/process/submitting-patches.rst#L340>
> 
> Already taken a note of it, will follow inline here onwards.
> 
>>> On Sat, Mar 9, 2024 at 11:38 PM Krzysztof Kozlowski <
>>> krzysztof.kozlowski@linaro.org> wrote:
>>>
>>>> On 09/03/2024 17:07, Animesh Agarwal wrote:
>>>>> Convert the imx-pata bindings to DT schema.
>>>>>
>>>>> Signed-off-by: Animesh Agarwal <animeshagarwal28@gmail.com>
>>>>> ---
>>>>> Changes in v3:
>>>>> - added fsl,imx51-pata in compatible property
>>>>
>>>> Please explain the differences done during conversion in the commit msg.
>> How did you solve this?
> 
> Added proper explanation for fsl,imx51-pata addition in the compatible
> property in commit message of v4.

I don't see anything about this in commit msg. Commit msg is exactly the
same as before. Try yourself - use b4 shazam to apply your patch and see
if commit msg contains that information.

> 
>>>> This allows only imx51 and disallows imx27 alone, which is not what old
>> ------------------------------^^^^^^^^^^^^^^^^^^^^^
>> How did you solve this?
> 
> I will resubmit patch v4 with more explanation.

You mean v5? You need oneOf allowing usage of imx27 alone.

Best regards,
Krzysztof
Animesh Agarwal March 10, 2024, 3:51 p.m. UTC | #4
On Sun, Mar 10, 2024 at 8:04 PM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
> I don't see anything about this in commit msg. Commit msg is exactly the
> same as before. Try yourself - use b4 shazam to apply your patch and see
> if commit msg contains that information.

I will post patch v5 containing the proper explanation in the Change Log.

> You mean v5? You need oneOf allowing usage of imx27 alone.
Ok will modify this in patch v5
diff mbox series

Patch

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..265ea80434e1
--- /dev/null
+++ b/Documentation/devicetree/bindings/ata/fsl,imx-pata.yaml
@@ -0,0 +1,40 @@ 
+# 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:
+    items:
+      - enum:
+          - 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>;
-	};