[PATCH v6 09/16] dt-bindings: imx6q-pcie: Clean up irrationality clocks check

Frank Li posted 16 patches 2 years ago
There is a newer version of this series
[PATCH v6 09/16] dt-bindings: imx6q-pcie: Clean up irrationality clocks check
Posted by Frank Li 2 years ago
There are clocks and clock-names restriction for difference compatible
string. So needn't irrationality check again for clock's miniItems and
maxItems.

In fsl,imx6q-pcie-ep.yaml
    if:
        enum: fsl,imx8mq-pcie-ep
    then:
	...
        clocks:
	clock-names:
	...
    else:
	...
        clocks:
	clock-names:
	...

In fsl,imx6q-pcie.yaml. There are 7 compatible string. Each one already
have clock check logic.

    if:
	enum: <compatible string>
    then:
	...
	clocks:
	clock-names:
	...

Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
---

Notes:
    Change from v5 to v6
    - rewrite git commit message and explain why remove it safely.
    - Add Rob's Ack
    Change from v1 to v4
    - new patch at v4

 .../bindings/pci/fsl,imx6q-pcie-common.yaml      | 16 ----------------
 1 file changed, 16 deletions(-)

diff --git a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-common.yaml b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-common.yaml
index 8f39b4e6e8491..a284a27c5e873 100644
--- a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-common.yaml
+++ b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-common.yaml
@@ -150,22 +150,6 @@ allOf:
             - {}
             - const: pcie_phy
             - const: pcie_aux
-  - if:
-      properties:
-        compatible:
-          not:
-            contains:
-              enum:
-                - fsl,imx6sx-pcie
-                - fsl,imx8mq-pcie
-                - fsl,imx6sx-pcie-ep
-                - fsl,imx8mq-pcie-ep
-    then:
-      properties:
-        clocks:
-          maxItems: 3
-        clock-names:
-          maxItems: 3
 
   - if:
       properties:
-- 
2.34.1
Re: [PATCH v6 09/16] dt-bindings: imx6q-pcie: Clean up irrationality clocks check
Posted by Krzysztof Kozlowski 2 years ago
On 24/12/2023 19:32, Frank Li wrote:
> There are clocks and clock-names restriction for difference compatible
> string. So needn't irrationality check again for clock's miniItems and
> maxItems.
> 
> In fsl,imx6q-pcie-ep.yaml

It is enough to say that bindings referencing this file already define
these constraints for each of the variants, so the if:else: is redundant.

Two lines instead of ~20.

> 	...
> 
> Acked-by: Rob Herring <robh@kernel.org>

How did you get it? Please point me to the lore link. This patch
appeared in v5 and there was no response from Rob, AFAIK.


Best regards,
Krzysztof
Re: [PATCH v6 09/16] dt-bindings: imx6q-pcie: Clean up irrationality clocks check
Posted by Krzysztof Kozlowski 2 years ago
On 25/12/2023 20:05, Krzysztof Kozlowski wrote:
> On 24/12/2023 19:32, Frank Li wrote:
>> There are clocks and clock-names restriction for difference compatible
>> string. So needn't irrationality check again for clock's miniItems and
>> maxItems.
>>
>> In fsl,imx6q-pcie-ep.yaml
> 
> It is enough to say that bindings referencing this file already define
> these constraints for each of the variants, so the if:else: is redundant.
> 
> Two lines instead of ~20.
> 
>> 	...
>>
>> Acked-by: Rob Herring <robh@kernel.org>
> 
> How did you get it? Please point me to the lore link. This patch
> appeared in v5 and there was no response from Rob, AFAIK.

Ah, this patch was added at v4 and Rob acked that one. It's fine then,
but you still could narrow the commit msg, if there is going to be a
resend. Please write informative but concise messages.

Best regards,
Krzysztof