Message ID | 20230119130028.106817-2-krzysztof.kozlowski@linaro.org |
---|---|
State | New |
Headers | show |
Series | [1/2] dt-bindings: clock: qcom,sm8450-camcc: constrain required-opps | expand |
On 19-01-23, 14:00, Krzysztof Kozlowski wrote: > Be specific how many required-opps are allowed. > > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > > --- > > This change is independent, although logically is connected with my > dtschema pull: > https://github.com/devicetree-org/dt-schema/pull/95 > --- > Documentation/devicetree/bindings/opp/opp-v2-base.yaml | 1 + > Documentation/devicetree/bindings/opp/opp-v2-kryo-cpu.yaml | 3 ++- > 2 files changed, 3 insertions(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/opp/opp-v2-base.yaml b/Documentation/devicetree/bindings/opp/opp-v2-base.yaml > index 47e6f36b7637..9b141a409191 100644 > --- a/Documentation/devicetree/bindings/opp/opp-v2-base.yaml > +++ b/Documentation/devicetree/bindings/opp/opp-v2-base.yaml > @@ -202,6 +202,7 @@ patternProperties: > for the functioning of the current device at the current OPP (where > this property is present). > $ref: /schemas/types.yaml#/definitions/phandle-array > + maxItems: 1 I may not under this property very well. What exactly does this line say ? Asking as required-properties can have an array of phandles as well. > items: > maxItems: 1 > > diff --git a/Documentation/devicetree/bindings/opp/opp-v2-kryo-cpu.yaml b/Documentation/devicetree/bindings/opp/opp-v2-kryo-cpu.yaml > index b4947b326773..438880db1872 100644 > --- a/Documentation/devicetree/bindings/opp/opp-v2-kryo-cpu.yaml > +++ b/Documentation/devicetree/bindings/opp/opp-v2-kryo-cpu.yaml > @@ -59,7 +59,8 @@ patternProperties: > > clock-latency-ns: true > > - required-opps: true > + required-opps: > + maxItems: 1 > > required: > - opp-hz > -- > 2.34.1
On 20/01/2023 05:38, Viresh Kumar wrote: > On 19-01-23, 14:00, Krzysztof Kozlowski wrote: >> Be specific how many required-opps are allowed. >> >> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> >> >> --- >> >> This change is independent, although logically is connected with my >> dtschema pull: >> https://github.com/devicetree-org/dt-schema/pull/95 >> --- >> Documentation/devicetree/bindings/opp/opp-v2-base.yaml | 1 + >> Documentation/devicetree/bindings/opp/opp-v2-kryo-cpu.yaml | 3 ++- >> 2 files changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/Documentation/devicetree/bindings/opp/opp-v2-base.yaml b/Documentation/devicetree/bindings/opp/opp-v2-base.yaml >> index 47e6f36b7637..9b141a409191 100644 >> --- a/Documentation/devicetree/bindings/opp/opp-v2-base.yaml >> +++ b/Documentation/devicetree/bindings/opp/opp-v2-base.yaml >> @@ -202,6 +202,7 @@ patternProperties: >> for the functioning of the current device at the current OPP (where >> this property is present). >> $ref: /schemas/types.yaml#/definitions/phandle-array >> + maxItems: 1 > > I may not under this property very well. What exactly does this line > say ? Asking as required-properties can have an array of phandles as > well. > It says we can have maximum one item in "required-opps" in "opp" node and you are right that we could have here more. I'll fix it. Best regards, Krzysztof
On 20/01/2023 07:27, Krzysztof Kozlowski wrote: > On 20/01/2023 05:38, Viresh Kumar wrote: >> On 19-01-23, 14:00, Krzysztof Kozlowski wrote: >>> Be specific how many required-opps are allowed. >>> >>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> >>> >>> --- >>> >>> This change is independent, although logically is connected with my >>> dtschema pull: >>> https://github.com/devicetree-org/dt-schema/pull/95 >>> --- >>> Documentation/devicetree/bindings/opp/opp-v2-base.yaml | 1 + >>> Documentation/devicetree/bindings/opp/opp-v2-kryo-cpu.yaml | 3 ++- >>> 2 files changed, 3 insertions(+), 1 deletion(-) >>> >>> diff --git a/Documentation/devicetree/bindings/opp/opp-v2-base.yaml b/Documentation/devicetree/bindings/opp/opp-v2-base.yaml >>> index 47e6f36b7637..9b141a409191 100644 >>> --- a/Documentation/devicetree/bindings/opp/opp-v2-base.yaml >>> +++ b/Documentation/devicetree/bindings/opp/opp-v2-base.yaml >>> @@ -202,6 +202,7 @@ patternProperties: >>> for the functioning of the current device at the current OPP (where >>> this property is present). >>> $ref: /schemas/types.yaml#/definitions/phandle-array >>> + maxItems: 1 >> >> I may not under this property very well. What exactly does this line >> say ? Asking as required-properties can have an array of phandles as >> well. >> > > It says we can have maximum one item in "required-opps" in "opp" node > and you are right that we could have here more. I'll fix it. OK, this patch can be actually dropped. The dtschema will bring constraints of 1-8 number of items here, which should cover all cases for both opps - v2 and v2-kryo-cpu. Best regards, Krzysztof
diff --git a/Documentation/devicetree/bindings/opp/opp-v2-base.yaml b/Documentation/devicetree/bindings/opp/opp-v2-base.yaml index 47e6f36b7637..9b141a409191 100644 --- a/Documentation/devicetree/bindings/opp/opp-v2-base.yaml +++ b/Documentation/devicetree/bindings/opp/opp-v2-base.yaml @@ -202,6 +202,7 @@ patternProperties: for the functioning of the current device at the current OPP (where this property is present). $ref: /schemas/types.yaml#/definitions/phandle-array + maxItems: 1 items: maxItems: 1 diff --git a/Documentation/devicetree/bindings/opp/opp-v2-kryo-cpu.yaml b/Documentation/devicetree/bindings/opp/opp-v2-kryo-cpu.yaml index b4947b326773..438880db1872 100644 --- a/Documentation/devicetree/bindings/opp/opp-v2-kryo-cpu.yaml +++ b/Documentation/devicetree/bindings/opp/opp-v2-kryo-cpu.yaml @@ -59,7 +59,8 @@ patternProperties: clock-latency-ns: true - required-opps: true + required-opps: + maxItems: 1 required: - opp-hz
Be specific how many required-opps are allowed. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> --- This change is independent, although logically is connected with my dtschema pull: https://github.com/devicetree-org/dt-schema/pull/95 --- Documentation/devicetree/bindings/opp/opp-v2-base.yaml | 1 + Documentation/devicetree/bindings/opp/opp-v2-kryo-cpu.yaml | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-)