diff mbox series

[v2,3/5] dt-bindings: interconnect: qcom: Reuse new rpmh-common bindings

Message ID 20220520070318.48521-4-luca.weiss@fairphone.com (mailing list archive)
State Handled Elsewhere, archived
Headers show
Series Add interconnect support for SM6350 | expand

Commit Message

Luca Weiss May 20, 2022, 7:03 a.m. UTC
Stop defining the properties twice and use the ones provided in the new
qcom,rpmh-common.yaml.

Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
Changes since v1:
* New patch

 .../bindings/interconnect/qcom,rpmh.yaml      | 22 +++++--------------
 1 file changed, 5 insertions(+), 17 deletions(-)

Comments

Krzysztof Kozlowski May 20, 2022, 10:33 a.m. UTC | #1
On 20/05/2022 09:03, Luca Weiss wrote:
> Stop defining the properties twice and use the ones provided in the new
> qcom,rpmh-common.yaml.
> 
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> ---
> Changes since v1:
> * New patch
> 
>  .../bindings/interconnect/qcom,rpmh.yaml      | 22 +++++--------------
>  1 file changed, 5 insertions(+), 17 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/interconnect/qcom,rpmh.yaml b/Documentation/devicetree/bindings/interconnect/qcom,rpmh.yaml
> index fae3363fed02..e822dc099339 100644
> --- a/Documentation/devicetree/bindings/interconnect/qcom,rpmh.yaml
> +++ b/Documentation/devicetree/bindings/interconnect/qcom,rpmh.yaml
> @@ -18,6 +18,9 @@ description: |
>     least one RPMh device child node pertaining to their RSC and each provider
>     can map to multiple RPMh resources.
>  
> +allOf:
> +  - $ref: qcom,rpmh-common.yaml#
> +
>  properties:
>    reg:
>      maxItems: 1
> @@ -131,28 +134,13 @@ properties:
>        - qcom,sm8450-pcie-anoc
>        - qcom,sm8450-system-noc
>  
> -  '#interconnect-cells':
> -    enum: [ 1, 2 ]
> -
> -  qcom,bcm-voters:
> -    $ref: /schemas/types.yaml#/definitions/phandle-array
> -    items:
> -      maxItems: 1
> -    description: |
> -      List of phandles to qcom,bcm-voter nodes that are required by
> -      this interconnect to send RPMh commands.
> -
> -  qcom,bcm-voter-names:
> -    description: |
> -      Names for each of the qcom,bcm-voters specified.
> +  '#interconnect-cells': true
>  

So this explains why your previous patch had such values... The order is
messed up - first you move common parts to common file, then you add
SM6350 support.


Best regards,
Krzysztof
Luca Weiss May 20, 2022, 11:42 a.m. UTC | #2
Hi Krzysztof,

On Fri May 20, 2022 at 12:33 PM CEST, Krzysztof Kozlowski wrote:
> On 20/05/2022 09:03, Luca Weiss wrote:
> > Stop defining the properties twice and use the ones provided in the new
> > qcom,rpmh-common.yaml.
> > 
> > Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> > ---
> > Changes since v1:
> > * New patch
> > 
> >  .../bindings/interconnect/qcom,rpmh.yaml      | 22 +++++--------------
> >  1 file changed, 5 insertions(+), 17 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/interconnect/qcom,rpmh.yaml b/Documentation/devicetree/bindings/interconnect/qcom,rpmh.yaml
> > index fae3363fed02..e822dc099339 100644
> > --- a/Documentation/devicetree/bindings/interconnect/qcom,rpmh.yaml
> > +++ b/Documentation/devicetree/bindings/interconnect/qcom,rpmh.yaml
> > @@ -18,6 +18,9 @@ description: |
> >     least one RPMh device child node pertaining to their RSC and each provider
> >     can map to multiple RPMh resources.
> >  
> > +allOf:
> > +  - $ref: qcom,rpmh-common.yaml#
> > +
> >  properties:
> >    reg:
> >      maxItems: 1
> > @@ -131,28 +134,13 @@ properties:
> >        - qcom,sm8450-pcie-anoc
> >        - qcom,sm8450-system-noc
> >  
> > -  '#interconnect-cells':
> > -    enum: [ 1, 2 ]
> > -
> > -  qcom,bcm-voters:
> > -    $ref: /schemas/types.yaml#/definitions/phandle-array
> > -    items:
> > -      maxItems: 1
> > -    description: |
> > -      List of phandles to qcom,bcm-voter nodes that are required by
> > -      this interconnect to send RPMh commands.
> > -
> > -  qcom,bcm-voter-names:
> > -    description: |
> > -      Names for each of the qcom,bcm-voters specified.
> > +  '#interconnect-cells': true
> >  
>
> So this explains why your previous patch had such values... The order is
> messed up - first you move common parts to common file, then you add
> SM6350 support.

Right, that makes much more sense. Will split out qcom,rpmh-common first
and use in rpmh.yaml and then afterwards introduce sm6350.

Regards
Luca

>
>
> Best regards,
> Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/interconnect/qcom,rpmh.yaml b/Documentation/devicetree/bindings/interconnect/qcom,rpmh.yaml
index fae3363fed02..e822dc099339 100644
--- a/Documentation/devicetree/bindings/interconnect/qcom,rpmh.yaml
+++ b/Documentation/devicetree/bindings/interconnect/qcom,rpmh.yaml
@@ -18,6 +18,9 @@  description: |
    least one RPMh device child node pertaining to their RSC and each provider
    can map to multiple RPMh resources.
 
+allOf:
+  - $ref: qcom,rpmh-common.yaml#
+
 properties:
   reg:
     maxItems: 1
@@ -131,28 +134,13 @@  properties:
       - qcom,sm8450-pcie-anoc
       - qcom,sm8450-system-noc
 
-  '#interconnect-cells':
-    enum: [ 1, 2 ]
-
-  qcom,bcm-voters:
-    $ref: /schemas/types.yaml#/definitions/phandle-array
-    items:
-      maxItems: 1
-    description: |
-      List of phandles to qcom,bcm-voter nodes that are required by
-      this interconnect to send RPMh commands.
-
-  qcom,bcm-voter-names:
-    description: |
-      Names for each of the qcom,bcm-voters specified.
+  '#interconnect-cells': true
 
 required:
   - compatible
   - reg
-  - '#interconnect-cells'
-  - qcom,bcm-voters
 
-additionalProperties: false
+unevaluatedProperties: false
 
 examples:
   - |