Message ID | 20231229191038.247258-1-david@ixit.cz |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-13208-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp2752940dyb; Fri, 29 Dec 2023 11:11:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IFsObkLDhg5fnozQvD2AbDsoizKXQTfUUgJgMx2TKiJhIvOP8OonzHCS/AwRkFum7V+reMh X-Received: by 2002:a05:651c:1254:b0:2cc:d4ce:9c0c with SMTP id h20-20020a05651c125400b002ccd4ce9c0cmr2292145ljh.104.1703877085752; Fri, 29 Dec 2023 11:11:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703877085; cv=none; d=google.com; s=arc-20160816; b=ecp/tTlItVvvI06EmdStZovSwfvM9NUmWX+2eE8b/drhCjKI6d/HSda2pkGn98lY6T HOYzQ2h2OOw/o3neh7QdR3DmhkxcCK0/o8HQ6F2WaKQkiWXJrjxb4X8nO5hiNMQ12T4P TT0WVTm6xvD2xu0z+QtGDn9yk8wBG8fyTcYwUUgU6FzLTdiXCcNZxzcgYOa5Fn9x1PS4 bwqGZeVcGILgrYD4FW90RwS1D9EXRiTeQEp9DHq64qDFmSU78Bc3DWxo8nWgRLBsIy7G Wh1FeKIGvI3mL33Qu22AyI+8hOGl4jciLzThWyLi6zEvEQ4aVA3D0jSk+QjNwSJd/KOO fKQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=q0JdO7g/7YiJgRmDEIU1W+ag1x30v1qSlkuc7yHM1QY=; fh=dey+bMC10Lgmh1yQ/zJ41s8HdAqI5HRI37sIGsrSFKM=; b=nAagZUZALfKqPwEUCELX9RKhwQjVchO8vpmuIKsZ/gciC/VAHJkHJahKzBTgaWBWAc JFYeXqEBOSXtCaGqKC2JKMDRWL6FG9Lg28CYp1NIircMrtZkyWGLFytyh0P5GV8fmbVm RsZM96PaxlYpgo2V2qqD6sgrtsZaHZss918AcPfxJJ61gkSpFYOjn0DaMjtYK9VlEnja tbIlBNDo9kyTNlWMxC2e3MfF27SSbFZ2R5CAFxn2vah+sRbDL6i9SVgrm10n8lmG+96d YV8+5+WTAwXE5EILLJqd8+aoGhsE/6IKVw9HFgv6BnpzroFgl1OqKRCeixam4cTfgvZ+ +V2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ixit.cz header.s=dkim header.b="xs/aaxtT"; spf=pass (google.com: domain of linux-kernel+bounces-13208-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13208-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=ixit.cz Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id bt22-20020a0564020a5600b00552f7414417si8075782edb.575.2023.12.29.11.11.25 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Dec 2023 11:11:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-13208-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@ixit.cz header.s=dkim header.b="xs/aaxtT"; spf=pass (google.com: domain of linux-kernel+bounces-13208-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13208-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=ixit.cz Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id EB21D1F23A7F for <ouuuleilei@gmail.com>; Fri, 29 Dec 2023 19:11:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7FE34134A3; Fri, 29 Dec 2023 19:10:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ixit.cz header.i=@ixit.cz header.b="xs/aaxtT" X-Original-To: linux-kernel@vger.kernel.org Received: from ixit.cz (ip-89-177-23-149.bb.vodafone.cz [89.177.23.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 48EE712E46; Fri, 29 Dec 2023 19:10:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ixit.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ixit.cz Received: from newone.congress.ccc.de (unknown [151.217.64.190]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ixit.cz (Postfix) with ESMTPSA id BEE601630CF; Fri, 29 Dec 2023 20:10:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ixit.cz; s=dkim; t=1703877043; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=q0JdO7g/7YiJgRmDEIU1W+ag1x30v1qSlkuc7yHM1QY=; b=xs/aaxtTA1BdwJ9DgsJ4JxoQGwVX3OJYMgjVE9CaomvVGN4/OZEiQ9y6WNoSghib28eyFJ 1ZVgqXpxdrkv1pm9eeaROCvM9tHxCpHZbL18XUZOainHloZ4qwP9BJRK2GeMp3/+xsxTF4 ySEfKdJfzQriecRbbCOJOZ9LL/yQb88= From: David Heidelberg <david@ixit.cz> To: Viresh Kumar <vireshk@kernel.org>, Nishanth Menon <nm@ti.com>, Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh+dt@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> Cc: David Heidelberg <david@ixit.cz>, Viresh Kumar <viresh.kumar@linaro.org>, Rob Herring <robh@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] dt-bindings: opp: switch inner and outer min/maxItems rules for opp-hz Date: Fri, 29 Dec 2023 20:10:29 +0100 Message-ID: <20231229191038.247258-1-david@ixit.cz> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1786644619242358053 X-GMAIL-MSGID: 1786644619242358053 |
Series |
dt-bindings: opp: switch inner and outer min/maxItems rules for opp-hz
|
|
Commit Message
David Heidelberg
Dec. 29, 2023, 7:10 p.m. UTC
Fixes issue as:
```
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(-)
Comments
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). Best regards, Krzysztof
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
On Tue, Jan 02, 2024 at 04:58:15PM -0700, Rob Herring wrote: > 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. I've made some improvements on matrix dimensions, but this one is still an issue. Can you respin this dropping 'items: {maxItems: 1}'. I'm going to change the definition in property-units.yaml to uint64-array. Rob
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 opp-microvolt: description: |