public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: David Heidelberg <david@ixit.cz>,
	Viresh Kumar <vireshk@kernel.org>, Nishanth Menon <nm@ti.com>,
	Stephen Boyd <sboyd@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Manivannan Sadhasivam <mani@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dt-bindings: opp: switch inner and outer min/maxItems rules for opp-hz
Date: Tue, 2 Jan 2024 16:58:15 -0700	[thread overview]
Message-ID: <20240102235815.GA3700567-robh@kernel.org> (raw)
In-Reply-To: <2c9e91c7-8588-4260-8f5d-22c822019f62@linaro.org>

On Sat, Dec 30, 2023 at 03:17:21PM +0100, Krzysztof Kozlowski wrote:
> On 29/12/2023 20:10, David Heidelberg wrote:
> > Fixes issue as:
> > ```
> 
> Drop, it's not RST, but commit msg.
> 
> > arch/arm64/boot/dts/qcom/sdm845-oneplus-enchilada.dtb: opp-table: opp-200000000:opp-hz:0: [200000000, 0, 0, 150000000, 0, 0, 0, 0, 300000000] is too long
> > ```
> > 
> > Fixes: 3cb16ad69bef ("dt-bindings: opp: accept array of frequencies")
> > 
> > Signed-off-by: David Heidelberg <david@ixit.cz>
> > ---
> >  Documentation/devicetree/bindings/opp/opp-v2-base.yaml | 5 ++---
> >  1 file changed, 2 insertions(+), 3 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/opp/opp-v2-base.yaml b/Documentation/devicetree/bindings/opp/opp-v2-base.yaml
> > index e2f8f7af3cf4..86d3aa0eb435 100644
> > --- a/Documentation/devicetree/bindings/opp/opp-v2-base.yaml
> > +++ b/Documentation/devicetree/bindings/opp/opp-v2-base.yaml
> > @@ -55,10 +55,9 @@ patternProperties:
> >            to relate the values to their clocks or the order in which the clocks
> >            need to be configured and that is left for the implementation
> >            specific binding.
> > -        minItems: 1
> > -        maxItems: 32
> >          items:
> > -          maxItems: 1
> > +          minItems: 1
> > +          maxItems: 32
> 
> This does not look like correct fix. The original code looked fine -
> only one item is allowed in each sub-element (array).

This one is special being 64-bit values so we have an exception in 
property-units.yaml. The constraints here don't get used in decoding the 
dtb and the default way of 1 outer element is used.

It doesn't look like opp-hz needs to be a matrix as it is really just an 
array. Perhaps it should just be changed to an array type. 
Alternatively, adding 'items: { maxItems: 1 }' to the definition in 
property-units.yaml fixes the issue as well.

Though we can fix this, I'm looking into if we have other cases where we 
need this to work as-is. There's probably some room for improvement in 
how matrix dimensions are handled.

Rob

  reply	other threads:[~2024-01-02 23:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-29 19:10 [PATCH] dt-bindings: opp: switch inner and outer min/maxItems rules for opp-hz David Heidelberg
2023-12-30 14:17 ` Krzysztof Kozlowski
2024-01-02 23:58   ` Rob Herring [this message]
2024-01-30 17:06     ` Rob Herring
2024-03-04 20:34       ` David Heidelberg
2024-03-04 23:02         ` Rob Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240102235815.GA3700567-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=andersson@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=david@ixit.cz \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mani@kernel.org \
    --cc=nm@ti.com \
    --cc=sboyd@kernel.org \
    --cc=viresh.kumar@linaro.org \
    --cc=vireshk@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox