linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/6] dt-bindings: i2c: qcom,i2c-cci: Fall back to common compatibles
@ 2022-12-13 18:33 Konrad Dybcio
  2022-12-13 18:33 ` [PATCH v2 2/6] arm64: dts: qcom: msm8916: Add fallback CCI compatible Konrad Dybcio
                   ` (7 more replies)
  0 siblings, 8 replies; 13+ messages in thread
From: Konrad Dybcio @ 2022-12-13 18:33 UTC (permalink / raw)
  To: linux-arm-msm, andersson, agross, krzysztof.kozlowski
  Cc: marijn.suijten, Konrad Dybcio, Loic Poulain, Robert Foss,
	Rob Herring, Krzysztof Kozlowski, linux-i2c, devicetree,
	linux-kernel

Almost every compatible string in the CCI driver is a duplicate. Adjust
the bindings to include a common (first-soc-implementing-vX) compatible
to remove the need to keep adding superfluous compatible strings.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
Changes in v2:
- make sure the actual patch contests are tested..
- resolve errors

 .../devicetree/bindings/i2c/qcom,i2c-cci.yaml | 47 ++++++++++++-------
 1 file changed, 30 insertions(+), 17 deletions(-)

diff --git a/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml b/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
index cf9f8fda595f..87e414f0c39c 100644
--- a/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
+++ b/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
@@ -12,14 +12,23 @@ maintainers:
 
 properties:
   compatible:
-    enum:
-      - qcom,msm8226-cci
-      - qcom,msm8916-cci
-      - qcom,msm8974-cci
-      - qcom,msm8996-cci
-      - qcom,sdm845-cci
-      - qcom,sm8250-cci
-      - qcom,sm8450-cci
+    oneOf:
+      - enum:
+          - qcom,msm8226-cci
+          - qcom,msm8974-cci
+          - qcom,msm8996-cci
+
+      - items:
+          - enum:
+              - qcom,msm8916-cci
+          - const: qcom,msm8226-cci # CCI v1
+
+      - items:
+          - enum:
+              - qcom,sdm845-cci
+              - qcom,sm8250-cci
+              - qcom,sm8450-cci
+          - const: qcom,msm8996-cci # CCI v2
 
   "#address-cells":
     const: 1
@@ -88,10 +97,12 @@ allOf:
   - if:
       properties:
         compatible:
-          contains:
-            enum:
-              - qcom,msm8226-cci
-              - qcom,msm8974-cci
+          oneOf:
+            - contains:
+                enum:
+                  - qcom,msm8974-cci
+
+            - const: qcom,msm8226-cci
     then:
       properties:
         clocks:
@@ -105,10 +116,12 @@ allOf:
   - if:
       properties:
         compatible:
-          contains:
-            enum:
-              - qcom,msm8916-cci
-              - qcom,msm8996-cci
+          oneOf:
+            - contains:
+                enum:
+                  - qcom,msm8916-cci
+
+            - const: qcom,msm8996-cci
     then:
       properties:
         clocks:
@@ -169,7 +182,7 @@ examples:
 
     cci@ac4a000 {
         reg = <0x0ac4a000 0x4000>;
-        compatible = "qcom,sdm845-cci";
+        compatible = "qcom,sdm845-cci", "qcom,msm8996-cci";
         #address-cells = <1>;
         #size-cells = <0>;
 
-- 
2.39.0


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

* [PATCH v2 2/6] arm64: dts: qcom: msm8916: Add fallback CCI compatible
  2022-12-13 18:33 [PATCH v2 1/6] dt-bindings: i2c: qcom,i2c-cci: Fall back to common compatibles Konrad Dybcio
@ 2022-12-13 18:33 ` Konrad Dybcio
  2022-12-13 18:33 ` [PATCH v2 3/6] arm64: dts: qcom: sdm845: " Konrad Dybcio
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Konrad Dybcio @ 2022-12-13 18:33 UTC (permalink / raw)
  To: linux-arm-msm, andersson, agross, krzysztof.kozlowski
  Cc: marijn.suijten, Konrad Dybcio, Loic Poulain, Robert Foss,
	Rob Herring, Krzysztof Kozlowski, linux-i2c, devicetree,
	linux-kernel

Add a fallback CCI compatible, as required by bindings.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
No changes in v2.

 arch/arm64/boot/dts/qcom/msm8916.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi
index 2ca8e977fc2a..4c0a0078adb5 100644
--- a/arch/arm64/boot/dts/qcom/msm8916.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi
@@ -1167,7 +1167,7 @@ ports {
 		};
 
 		cci: cci@1b0c000 {
-			compatible = "qcom,msm8916-cci";
+			compatible = "qcom,msm8916-cci", "qcom,msm8226-cci";
 			#address-cells = <1>;
 			#size-cells = <0>;
 			reg = <0x01b0c000 0x1000>;
-- 
2.39.0


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

* [PATCH v2 3/6] arm64: dts: qcom: sdm845: Add fallback CCI compatible
  2022-12-13 18:33 [PATCH v2 1/6] dt-bindings: i2c: qcom,i2c-cci: Fall back to common compatibles Konrad Dybcio
  2022-12-13 18:33 ` [PATCH v2 2/6] arm64: dts: qcom: msm8916: Add fallback CCI compatible Konrad Dybcio
@ 2022-12-13 18:33 ` Konrad Dybcio
  2022-12-13 18:33 ` [PATCH v2 4/6] arm64: dts: qcom: sm8250: " Konrad Dybcio
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Konrad Dybcio @ 2022-12-13 18:33 UTC (permalink / raw)
  To: linux-arm-msm, andersson, agross, krzysztof.kozlowski
  Cc: marijn.suijten, Konrad Dybcio, Loic Poulain, Robert Foss,
	Rob Herring, Krzysztof Kozlowski, linux-i2c, devicetree,
	linux-kernel

Add a fallback CCI compatible, as required by bindings.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
No changes in v2.

 arch/arm64/boot/dts/qcom/sdm845.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
index 9eecf1b4ebf9..154f5054a200 100644
--- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
@@ -4386,7 +4386,7 @@ port@3 {
 		};
 
 		cci: cci@ac4a000 {
-			compatible = "qcom,sdm845-cci";
+			compatible = "qcom,sdm845-cci", "qcom,msm8996-cci";
 			#address-cells = <1>;
 			#size-cells = <0>;
 
-- 
2.39.0


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

* [PATCH v2 4/6] arm64: dts: qcom: sm8250: Add fallback CCI compatible
  2022-12-13 18:33 [PATCH v2 1/6] dt-bindings: i2c: qcom,i2c-cci: Fall back to common compatibles Konrad Dybcio
  2022-12-13 18:33 ` [PATCH v2 2/6] arm64: dts: qcom: msm8916: Add fallback CCI compatible Konrad Dybcio
  2022-12-13 18:33 ` [PATCH v2 3/6] arm64: dts: qcom: sdm845: " Konrad Dybcio
@ 2022-12-13 18:33 ` Konrad Dybcio
  2022-12-13 18:33 ` [PATCH v2 5/6] arm64: dts: qcom: sm8450: " Konrad Dybcio
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Konrad Dybcio @ 2022-12-13 18:33 UTC (permalink / raw)
  To: linux-arm-msm, andersson, agross, krzysztof.kozlowski
  Cc: marijn.suijten, Konrad Dybcio, Loic Poulain, Robert Foss,
	Rob Herring, Krzysztof Kozlowski, linux-i2c, devicetree,
	linux-kernel

Add a fallback CCI compatible, as required by bindings.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
No changes in v2.

 arch/arm64/boot/dts/qcom/sm8250.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi
index 0c4ecdab1244..6d16857fed26 100644
--- a/arch/arm64/boot/dts/qcom/sm8250.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi
@@ -3723,7 +3723,7 @@ videocc: clock-controller@abf0000 {
 		};
 
 		cci0: cci@ac4f000 {
-			compatible = "qcom,sm8250-cci";
+			compatible = "qcom,sm8250-cci", "qcom,msm8996-cci";
 			#address-cells = <1>;
 			#size-cells = <0>;
 
@@ -3764,7 +3764,7 @@ cci0_i2c1: i2c-bus@1 {
 		};
 
 		cci1: cci@ac50000 {
-			compatible = "qcom,sm8250-cci";
+			compatible = "qcom,sm8250-cci", "qcom,msm8996-cci";
 			#address-cells = <1>;
 			#size-cells = <0>;
 
-- 
2.39.0


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

* [PATCH v2 5/6] arm64: dts: qcom: sm8450: Add fallback CCI compatible
  2022-12-13 18:33 [PATCH v2 1/6] dt-bindings: i2c: qcom,i2c-cci: Fall back to common compatibles Konrad Dybcio
                   ` (2 preceding siblings ...)
  2022-12-13 18:33 ` [PATCH v2 4/6] arm64: dts: qcom: sm8250: " Konrad Dybcio
@ 2022-12-13 18:33 ` Konrad Dybcio
  2022-12-13 18:33 ` [PATCH v2 6/6] i2c: qcom-cci: Deprecate duplicated compatibles Konrad Dybcio
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Konrad Dybcio @ 2022-12-13 18:33 UTC (permalink / raw)
  To: linux-arm-msm, andersson, agross, krzysztof.kozlowski
  Cc: marijn.suijten, Konrad Dybcio, Loic Poulain, Robert Foss,
	Rob Herring, Krzysztof Kozlowski, linux-i2c, devicetree,
	linux-kernel

Add a fallback CCI compatible, as required by bindings.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
Changes in v2:
- new patch

 arch/arm64/boot/dts/qcom/sm8450.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi
index a8f8ffd728d7..a9ed8443ac02 100644
--- a/arch/arm64/boot/dts/qcom/sm8450.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi
@@ -2554,7 +2554,7 @@ IPCC_MPROC_SIGNAL_GLINK_QMP
 		};
 
 		cci0: cci@ac15000 {
-			compatible = "qcom,sm8450-cci";
+			compatible = "qcom,sm8450-cci", "qcom,msm8996-cci";
 			reg = <0 0xac15000 0 0x1000>;
 			interrupts = <GIC_SPI 460 IRQ_TYPE_EDGE_RISING>;
 			power-domains = <&camcc TITAN_TOP_GDSC>;
@@ -2593,7 +2593,7 @@ cci0_i2c1: i2c-bus@1 {
 		};
 
 		cci1: cci@ac16000 {
-			compatible = "qcom,sm8450-cci";
+			compatible = "qcom,sm8450-cci", "qcom,msm8996-cci";
 			reg = <0 0xac16000 0 0x1000>;
 			interrupts = <GIC_SPI 271 IRQ_TYPE_EDGE_RISING>;
 			power-domains = <&camcc TITAN_TOP_GDSC>;
-- 
2.39.0


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

* [PATCH v2 6/6] i2c: qcom-cci: Deprecate duplicated compatibles
  2022-12-13 18:33 [PATCH v2 1/6] dt-bindings: i2c: qcom,i2c-cci: Fall back to common compatibles Konrad Dybcio
                   ` (3 preceding siblings ...)
  2022-12-13 18:33 ` [PATCH v2 5/6] arm64: dts: qcom: sm8450: " Konrad Dybcio
@ 2022-12-13 18:33 ` Konrad Dybcio
  2022-12-13 19:17   ` Krzysztof Kozlowski
  2023-01-09 12:07   ` Wolfram Sang
  2022-12-13 19:16 ` [PATCH v2 1/6] dt-bindings: i2c: qcom,i2c-cci: Fall back to common compatibles Krzysztof Kozlowski
                   ` (2 subsequent siblings)
  7 siblings, 2 replies; 13+ messages in thread
From: Konrad Dybcio @ 2022-12-13 18:33 UTC (permalink / raw)
  To: linux-arm-msm, andersson, agross, krzysztof.kozlowski
  Cc: marijn.suijten, Konrad Dybcio, Loic Poulain, Robert Foss,
	Rob Herring, Krzysztof Kozlowski, linux-i2c, devicetree,
	linux-kernel

Many compatibles have been introduced, pointing to the same config data.
Leave a note reminding future developers to not do that again.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
Changes in v2:
- new patch

 drivers/i2c/busses/i2c-qcom-cci.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-qcom-cci.c b/drivers/i2c/busses/i2c-qcom-cci.c
index a4b97fe3c3a5..01358472680c 100644
--- a/drivers/i2c/busses/i2c-qcom-cci.c
+++ b/drivers/i2c/busses/i2c-qcom-cci.c
@@ -811,9 +811,15 @@ static const struct cci_data cci_v2_data = {
 
 static const struct of_device_id cci_dt_match[] = {
 	{ .compatible = "qcom,msm8226-cci", .data = &cci_v1_data},
-	{ .compatible = "qcom,msm8916-cci", .data = &cci_v1_data},
 	{ .compatible = "qcom,msm8974-cci", .data = &cci_v1_5_data},
 	{ .compatible = "qcom,msm8996-cci", .data = &cci_v2_data},
+
+
+	/*
+	 * Legacy compatibles kept for backwards compatibility.
+	 * Do not add any new ones unless they introduce a new config
+	 */
+	{ .compatible = "qcom,msm8916-cci", .data = &cci_v1_data},
 	{ .compatible = "qcom,sdm845-cci", .data = &cci_v2_data},
 	{ .compatible = "qcom,sm8250-cci", .data = &cci_v2_data},
 	{ .compatible = "qcom,sm8450-cci", .data = &cci_v2_data},
-- 
2.39.0


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

* Re: [PATCH v2 1/6] dt-bindings: i2c: qcom,i2c-cci: Fall back to common compatibles
  2022-12-13 18:33 [PATCH v2 1/6] dt-bindings: i2c: qcom,i2c-cci: Fall back to common compatibles Konrad Dybcio
                   ` (4 preceding siblings ...)
  2022-12-13 18:33 ` [PATCH v2 6/6] i2c: qcom-cci: Deprecate duplicated compatibles Konrad Dybcio
@ 2022-12-13 19:16 ` Krzysztof Kozlowski
  2022-12-13 19:20   ` Konrad Dybcio
  2023-01-09 12:06 ` Wolfram Sang
  2023-01-11  5:09 ` (subset) " Bjorn Andersson
  7 siblings, 1 reply; 13+ messages in thread
From: Krzysztof Kozlowski @ 2022-12-13 19:16 UTC (permalink / raw)
  To: Konrad Dybcio, linux-arm-msm, andersson, agross
  Cc: marijn.suijten, Loic Poulain, Robert Foss, Rob Herring,
	Krzysztof Kozlowski, linux-i2c, devicetree, linux-kernel

On 13/12/2022 19:33, Konrad Dybcio wrote:
> Almost every compatible string in the CCI driver is a duplicate. Adjust
> the bindings to include a common (first-soc-implementing-vX) compatible
> to remove the need to keep adding superfluous compatible strings.
> 
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
> Changes in v2:
> - make sure the actual patch contests are tested..
> - resolve errors
> 
>  .../devicetree/bindings/i2c/qcom,i2c-cci.yaml | 47 ++++++++++++-------
>  1 file changed, 30 insertions(+), 17 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml b/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
> index cf9f8fda595f..87e414f0c39c 100644
> --- a/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
> +++ b/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
> @@ -12,14 +12,23 @@ maintainers:
>  
>  properties:
>    compatible:
> -    enum:
> -      - qcom,msm8226-cci
> -      - qcom,msm8916-cci
> -      - qcom,msm8974-cci
> -      - qcom,msm8996-cci
> -      - qcom,sdm845-cci
> -      - qcom,sm8250-cci
> -      - qcom,sm8450-cci
> +    oneOf:
> +      - enum:
> +          - qcom,msm8226-cci
> +          - qcom,msm8974-cci
> +          - qcom,msm8996-cci
> +
> +      - items:
> +          - enum:
> +              - qcom,msm8916-cci
> +          - const: qcom,msm8226-cci # CCI v1
> +
> +      - items:
> +          - enum:
> +              - qcom,sdm845-cci
> +              - qcom,sm8250-cci
> +              - qcom,sm8450-cci
> +          - const: qcom,msm8996-cci # CCI v2
>  
>    "#address-cells":
>      const: 1
> @@ -88,10 +97,12 @@ allOf:
>    - if:
>        properties:
>          compatible:
> -          contains:
> -            enum:
> -              - qcom,msm8226-cci
> -              - qcom,msm8974-cci
> +          oneOf:
> +            - contains:
> +                enum:
> +                  - qcom,msm8974-cci
> +
> +            - const: qcom,msm8226-cci

The old version is here also correct and simpler. I don't think you need
to change it this way.

>      then:
>        properties:
>          clocks:
> @@ -105,10 +116,12 @@ allOf:
>    - if:
>        properties:
>          compatible:
> -          contains:
> -            enum:
> -              - qcom,msm8916-cci
> -              - qcom,msm8996-cci
> +          oneOf:
> +            - contains:
> +                enum:
> +                  - qcom,msm8916-cci
> +
> +            - const: qcom,msm8996-cci

The same comment.

>      then:
>        properties:
>          clocks:
> @@ -169,7 +182,7 @@ examples:
>  
>      cci@ac4a000 {
>          reg = <0x0ac4a000 0x4000>;
> -        compatible = "qcom,sdm845-cci";
> +        compatible = "qcom,sdm845-cci", "qcom,msm8996-cci";
>          #address-cells = <1>;
>          #size-cells = <0>;
>  

Best regards,
Krzysztof


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

* Re: [PATCH v2 6/6] i2c: qcom-cci: Deprecate duplicated compatibles
  2022-12-13 18:33 ` [PATCH v2 6/6] i2c: qcom-cci: Deprecate duplicated compatibles Konrad Dybcio
@ 2022-12-13 19:17   ` Krzysztof Kozlowski
  2023-01-09 12:07   ` Wolfram Sang
  1 sibling, 0 replies; 13+ messages in thread
From: Krzysztof Kozlowski @ 2022-12-13 19:17 UTC (permalink / raw)
  To: Konrad Dybcio, linux-arm-msm, andersson, agross
  Cc: marijn.suijten, Loic Poulain, Robert Foss, Rob Herring,
	Krzysztof Kozlowski, linux-i2c, devicetree, linux-kernel

On 13/12/2022 19:33, Konrad Dybcio wrote:
> Many compatibles have been introduced, pointing to the same config data.
> Leave a note reminding future developers to not do that again.
> 
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
> Changes in v2:
> - new patch
> 


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


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

* Re: [PATCH v2 1/6] dt-bindings: i2c: qcom,i2c-cci: Fall back to common compatibles
  2022-12-13 19:16 ` [PATCH v2 1/6] dt-bindings: i2c: qcom,i2c-cci: Fall back to common compatibles Krzysztof Kozlowski
@ 2022-12-13 19:20   ` Konrad Dybcio
  2022-12-13 19:28     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 13+ messages in thread
From: Konrad Dybcio @ 2022-12-13 19:20 UTC (permalink / raw)
  To: Krzysztof Kozlowski, linux-arm-msm, andersson, agross
  Cc: marijn.suijten, Loic Poulain, Robert Foss, Rob Herring,
	Krzysztof Kozlowski, linux-i2c, devicetree, linux-kernel



On 13.12.2022 20:16, Krzysztof Kozlowski wrote:
> On 13/12/2022 19:33, Konrad Dybcio wrote:
>> Almost every compatible string in the CCI driver is a duplicate. Adjust
>> the bindings to include a common (first-soc-implementing-vX) compatible
>> to remove the need to keep adding superfluous compatible strings.
>>
>> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
>> ---
>> Changes in v2:
>> - make sure the actual patch contests are tested..
>> - resolve errors
>>
>>  .../devicetree/bindings/i2c/qcom,i2c-cci.yaml | 47 ++++++++++++-------
>>  1 file changed, 30 insertions(+), 17 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml b/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
>> index cf9f8fda595f..87e414f0c39c 100644
>> --- a/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
>> +++ b/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
>> @@ -12,14 +12,23 @@ maintainers:
>>  
>>  properties:
>>    compatible:
>> -    enum:
>> -      - qcom,msm8226-cci
>> -      - qcom,msm8916-cci
>> -      - qcom,msm8974-cci
>> -      - qcom,msm8996-cci
>> -      - qcom,sdm845-cci
>> -      - qcom,sm8250-cci
>> -      - qcom,sm8450-cci
>> +    oneOf:
>> +      - enum:
>> +          - qcom,msm8226-cci
>> +          - qcom,msm8974-cci
>> +          - qcom,msm8996-cci
>> +
>> +      - items:
>> +          - enum:
>> +              - qcom,msm8916-cci
>> +          - const: qcom,msm8226-cci # CCI v1
>> +
>> +      - items:
>> +          - enum:
>> +              - qcom,sdm845-cci
>> +              - qcom,sm8250-cci
>> +              - qcom,sm8450-cci
>> +          - const: qcom,msm8996-cci # CCI v2
>>  
>>    "#address-cells":
>>      const: 1
>> @@ -88,10 +97,12 @@ allOf:
>>    - if:
>>        properties:
>>          compatible:
>> -          contains:
>> -            enum:
>> -              - qcom,msm8226-cci
>> -              - qcom,msm8974-cci
>> +          oneOf:
>> +            - contains:
>> +                enum:
>> +                  - qcom,msm8974-cci
>> +
>> +            - const: qcom,msm8226-cci
> 
> The old version is here also correct and simpler. I don't think you need
> to change it this way.
> 
>>      then:
>>        properties:
>>          clocks:
>> @@ -105,10 +116,12 @@ allOf:
>>    - if:
>>        properties:
>>          compatible:
>> -          contains:
>> -            enum:
>> -              - qcom,msm8916-cci
>> -              - qcom,msm8996-cci
>> +          oneOf:
>> +            - contains:
>> +                enum:
>> +                  - qcom,msm8916-cci
>> +
>> +            - const: qcom,msm8996-cci
> 
> The same comment.
e.g. the 845 example contains 8996 but does not fall in this category,
reverting this change causes errors.

Konrad
> 
>>      then:
>>        properties:
>>          clocks:
>> @@ -169,7 +182,7 @@ examples:
>>  
>>      cci@ac4a000 {
>>          reg = <0x0ac4a000 0x4000>;
>> -        compatible = "qcom,sdm845-cci";
>> +        compatible = "qcom,sdm845-cci", "qcom,msm8996-cci";
>>          #address-cells = <1>;
>>          #size-cells = <0>;
>>  
> 
> Best regards,
> Krzysztof
> 

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

* Re: [PATCH v2 1/6] dt-bindings: i2c: qcom,i2c-cci: Fall back to common compatibles
  2022-12-13 19:20   ` Konrad Dybcio
@ 2022-12-13 19:28     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 13+ messages in thread
From: Krzysztof Kozlowski @ 2022-12-13 19:28 UTC (permalink / raw)
  To: Konrad Dybcio, linux-arm-msm, andersson, agross
  Cc: marijn.suijten, Loic Poulain, Robert Foss, Rob Herring,
	Krzysztof Kozlowski, linux-i2c, devicetree, linux-kernel

On 13/12/2022 20:20, Konrad Dybcio wrote:
> 
>>
>>>      then:
>>>        properties:
>>>          clocks:
>>> @@ -105,10 +116,12 @@ allOf:
>>>    - if:
>>>        properties:
>>>          compatible:
>>> -          contains:
>>> -            enum:
>>> -              - qcom,msm8916-cci
>>> -              - qcom,msm8996-cci
>>> +          oneOf:
>>> +            - contains:
>>> +                enum:
>>> +                  - qcom,msm8916-cci
>>> +
>>> +            - const: qcom,msm8996-cci
>>
>> The same comment.
> e.g. the 845 example contains 8996 but does not fall in this category,
> reverting this change causes errors.

Ah, I see, indeed. Looks reasonable:

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


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

* Re: [PATCH v2 1/6] dt-bindings: i2c: qcom,i2c-cci: Fall back to common compatibles
  2022-12-13 18:33 [PATCH v2 1/6] dt-bindings: i2c: qcom,i2c-cci: Fall back to common compatibles Konrad Dybcio
                   ` (5 preceding siblings ...)
  2022-12-13 19:16 ` [PATCH v2 1/6] dt-bindings: i2c: qcom,i2c-cci: Fall back to common compatibles Krzysztof Kozlowski
@ 2023-01-09 12:06 ` Wolfram Sang
  2023-01-11  5:09 ` (subset) " Bjorn Andersson
  7 siblings, 0 replies; 13+ messages in thread
From: Wolfram Sang @ 2023-01-09 12:06 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: linux-arm-msm, andersson, agross, krzysztof.kozlowski,
	marijn.suijten, Loic Poulain, Robert Foss, Rob Herring,
	Krzysztof Kozlowski, linux-i2c, devicetree, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 380 bytes --]

On Tue, Dec 13, 2022 at 07:33:00PM +0100, Konrad Dybcio wrote:
> Almost every compatible string in the CCI driver is a duplicate. Adjust
> the bindings to include a common (first-soc-implementing-vX) compatible
> to remove the need to keep adding superfluous compatible strings.
> 
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Applied to for-next, thanks!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH v2 6/6] i2c: qcom-cci: Deprecate duplicated compatibles
  2022-12-13 18:33 ` [PATCH v2 6/6] i2c: qcom-cci: Deprecate duplicated compatibles Konrad Dybcio
  2022-12-13 19:17   ` Krzysztof Kozlowski
@ 2023-01-09 12:07   ` Wolfram Sang
  1 sibling, 0 replies; 13+ messages in thread
From: Wolfram Sang @ 2023-01-09 12:07 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: linux-arm-msm, andersson, agross, krzysztof.kozlowski,
	marijn.suijten, Loic Poulain, Robert Foss, Rob Herring,
	Krzysztof Kozlowski, linux-i2c, devicetree, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 303 bytes --]

On Tue, Dec 13, 2022 at 07:33:05PM +0100, Konrad Dybcio wrote:
> Many compatibles have been introduced, pointing to the same config data.
> Leave a note reminding future developers to not do that again.
> 
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Applied to for-next, thanks!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: (subset) [PATCH v2 1/6] dt-bindings: i2c: qcom,i2c-cci: Fall back to common compatibles
  2022-12-13 18:33 [PATCH v2 1/6] dt-bindings: i2c: qcom,i2c-cci: Fall back to common compatibles Konrad Dybcio
                   ` (6 preceding siblings ...)
  2023-01-09 12:06 ` Wolfram Sang
@ 2023-01-11  5:09 ` Bjorn Andersson
  7 siblings, 0 replies; 13+ messages in thread
From: Bjorn Andersson @ 2023-01-11  5:09 UTC (permalink / raw)
  To: linux-arm-msm, konrad.dybcio, agross, krzysztof.kozlowski
  Cc: linux-i2c, marijn.suijten, loic.poulain, devicetree, robert.foss,
	linux-kernel, krzysztof.kozlowski+dt, robh+dt

On Tue, 13 Dec 2022 19:33:00 +0100, Konrad Dybcio wrote:
> Almost every compatible string in the CCI driver is a duplicate. Adjust
> the bindings to include a common (first-soc-implementing-vX) compatible
> to remove the need to keep adding superfluous compatible strings.
> 
> 

Applied, thanks!

[2/6] arm64: dts: qcom: msm8916: Add fallback CCI compatible
      commit: 6d88aafa6fdded2a76f60060ea50f7b8e98a2705
[3/6] arm64: dts: qcom: sdm845: Add fallback CCI compatible
      commit: 84c611c5bca41f584a990a041daf31bf73ba9b99
[4/6] arm64: dts: qcom: sm8250: Add fallback CCI compatible
      commit: dd45008b74e4ca28bbacf0d249dac821624a88b0
[5/6] arm64: dts: qcom: sm8450: Add fallback CCI compatible
      commit: 71b7c2df3109ee62e875b16fcb5654e626bf7cc7

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

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

end of thread, other threads:[~2023-01-11  5:19 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-13 18:33 [PATCH v2 1/6] dt-bindings: i2c: qcom,i2c-cci: Fall back to common compatibles Konrad Dybcio
2022-12-13 18:33 ` [PATCH v2 2/6] arm64: dts: qcom: msm8916: Add fallback CCI compatible Konrad Dybcio
2022-12-13 18:33 ` [PATCH v2 3/6] arm64: dts: qcom: sdm845: " Konrad Dybcio
2022-12-13 18:33 ` [PATCH v2 4/6] arm64: dts: qcom: sm8250: " Konrad Dybcio
2022-12-13 18:33 ` [PATCH v2 5/6] arm64: dts: qcom: sm8450: " Konrad Dybcio
2022-12-13 18:33 ` [PATCH v2 6/6] i2c: qcom-cci: Deprecate duplicated compatibles Konrad Dybcio
2022-12-13 19:17   ` Krzysztof Kozlowski
2023-01-09 12:07   ` Wolfram Sang
2022-12-13 19:16 ` [PATCH v2 1/6] dt-bindings: i2c: qcom,i2c-cci: Fall back to common compatibles Krzysztof Kozlowski
2022-12-13 19:20   ` Konrad Dybcio
2022-12-13 19:28     ` Krzysztof Kozlowski
2023-01-09 12:06 ` Wolfram Sang
2023-01-11  5:09 ` (subset) " Bjorn Andersson

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).