[1/2] dt-bindings: mfd: st,stpmic1: Add missing unevaluatedProperties for each regulator
Message ID | 20230725123740.149559-1-krzysztof.kozlowski@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9010:0:b0:3e4:2afc:c1 with SMTP id l16csp2446663vqg; Tue, 25 Jul 2023 05:56:00 -0700 (PDT) X-Google-Smtp-Source: APBJJlHfDe9gJclu8L98MYWr41zVUKPz4/HbtarqDNOTdKXmWCXGNragBRTGW4q1lfKj97Tt8hCZ X-Received: by 2002:a05:6358:6f0c:b0:134:61a5:7f05 with SMTP id r12-20020a0563586f0c00b0013461a57f05mr6816893rwn.10.1690289760426; Tue, 25 Jul 2023 05:56:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690289760; cv=none; d=google.com; s=arc-20160816; b=J1PBAHxa9u3RGOxX4XSfHQtIpa7N2AXC842pxCSt0KhfTv1AiYAqAVZiaHEV+cMCD8 Ivru823Btay5cExH1NQNKwcHgj9z2C/o7bR3HxokGU95h6W2pd+cK5LFrXzDm5HXfpMq emcdSlx3EkplM9zpN1hmJTpP3vfDf5Jwkqm+/97zfqeK1pOOHw3fDmbQM5XwlG62uSbI BEScikbylL/GbyrzBnWkkkmB2hP5DDciJtmR0EMAVTvmq+1IRy8vMTBvLrNz6cCQ30/j 0/gc2VBLCcfRB8xc/AryFCbfRTe/36Nr+kzpb46DZpiOlYQzKclN7pDhMNRYIZpDCU2P IYgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=APtGQc3fKP6CePKt+WyyWdo+NMha8U8IFSfN0Ytp6fU=; fh=qCDlhzT+Kd7dyFPhHsXP3rfILDOHr7ZW0IBtD5+1gRs=; b=KNTaQspMAa8YDzEujtmhPjWP0OJaFQu3v39cg1+jCXEyAg6+klB8bKw9fBku7HPpf1 Uq02N9mYqrOpagF+6FI0NQ2U+/eB8ChK8i4OaboOXWTXGvpNcTGrh0sErOnd1IPIv8nI laq1/uLKjQ2w7v+SSS3Wh2oeACY3zu4CrFgMXN26a1UZONxqWceRk9odM1AE7eB1BGkT IruELBfSCRaId47C8oxFVN2MrcIb/Pd+Axnhmw5i/aIaGdku5A4U+lw48b2gQLO9mWea XR6cbgUWifE7rqzgNtc+PK7YtO8rSbdY94AeiY4/6HUG1yJQoDjcKWZqvgt7C+COoGiC XXYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rfOeQdJq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 24-20020a631258000000b0056385a32757si7633024pgs.797.2023.07.25.05.55.42; Tue, 25 Jul 2023 05:55:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rfOeQdJq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233083AbjGYMhr (ORCPT <rfc822;kloczko.tomasz@gmail.com> + 99 others); Tue, 25 Jul 2023 08:37:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232494AbjGYMhq (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 25 Jul 2023 08:37:46 -0400 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21EDD97 for <linux-kernel@vger.kernel.org>; Tue, 25 Jul 2023 05:37:45 -0700 (PDT) Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-992b66e5affso917707966b.3 for <linux-kernel@vger.kernel.org>; Tue, 25 Jul 2023 05:37:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690288663; x=1690893463; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=APtGQc3fKP6CePKt+WyyWdo+NMha8U8IFSfN0Ytp6fU=; b=rfOeQdJq/fkO3knjEi7hj6+btTSJsEe96Ql9Ht4w0A31ZtOiFgUFQmJPPLA/VU2u3J ojSrx8BIMALu8MmDs9dz1sF2HizywkRDJXlbyllpDtKwJRNiTTp6SGtkUtbaMsJ8hzcH 1a4dBhAY03v1L6REQbaLRzs693MDnC5rSbycUD0Ytdy8aWAdTpkCH8YBLJaa8r5m6UZw wxeP22eVdbgFNM+3zFQ1Kd2PFB5owpD80+KxX8hEcBJRNVVZ+bJhXI5BEhbuQgMJSpKo 0cOKUA+eyOZFK9m17uf7LkgGAofD150kDfD0Ss5m3NpSxL30TzXaFtCr3k0tFBV7A9Fb 9zmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690288663; x=1690893463; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=APtGQc3fKP6CePKt+WyyWdo+NMha8U8IFSfN0Ytp6fU=; b=U33A/51aVixtRjAjLlImSft1XVWsOaCa1YClRzTov5rt3ilvck5OOqFkLsrt8Uv5NV 96dqAWGzRbHfKYuqysgrCENq8OJ5fapudkyjZwqNJ5XEdqial5p9e9xu7cFRcxrvtPOP mp/CxWwQYBywcl0KKPVsq5U2IpAeaDM7jrj1LrG4sRJ/SE5BjveoZQomSIgbq8w3V1Kr 9a7pTIyfSse85zZDr4RdE26F1g6vgvziZhtOFRhSHbmQK7IB4QGi6QVm2w7kELXlJGyL nCPFC3BgCTiOYav//0gva9ZuPO6RMygQDycIMmu7Z/IELw3lsqgrUvUOqG+4ra4MK2Uj Ufug== X-Gm-Message-State: ABy/qLZyz/p7e9GMpjswE732Usq8GALzvSthrUX6XgiRXGDvJIR/D7+x EMz844nGcEvJNxAbBCjZ/KMwSg== X-Received: by 2002:a17:906:1046:b0:991:cd1f:e67a with SMTP id j6-20020a170906104600b00991cd1fe67amr13784335ejj.29.1690288663684; Tue, 25 Jul 2023 05:37:43 -0700 (PDT) Received: from krzk-bin.. ([178.197.223.104]) by smtp.gmail.com with ESMTPSA id qx26-20020a170906fcda00b00982cfe1fe5dsm8187480ejb.65.2023.07.25.05.37.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jul 2023 05:37:43 -0700 (PDT) From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> To: Lee Jones <lee@kernel.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, pascal Paillet <p.paillet@foss.st.com>, Linus Walleij <linus.walleij@linaro.org>, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Subject: [PATCH 1/2] dt-bindings: mfd: st,stpmic1: Add missing unevaluatedProperties for each regulator Date: Tue, 25 Jul 2023 14:37:39 +0200 Message-Id: <20230725123740.149559-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772397275413537173 X-GMAIL-MSGID: 1772397275413537173 |
Series |
[1/2] dt-bindings: mfd: st,stpmic1: Add missing unevaluatedProperties for each regulator
|
|
Commit Message
Krzysztof Kozlowski
July 25, 2023, 12:37 p.m. UTC
Each regulator node, which references common regulator.yaml schema,
should disallow additional or unevaluated properties. Otherwise
mistakes in properties will go unnoticed. unevaluatedProperties:false
requires listing existing properties (present in example and in other
regulators of this device).
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
Documentation/devicetree/bindings/mfd/st,stpmic1.yaml | 10 ++++++++++
1 file changed, 10 insertions(+)
Comments
On 25/07/2023 14:37, Krzysztof Kozlowski wrote: > Each regulator node, which references common regulator.yaml schema, > should disallow additional or unevaluated properties. Otherwise > mistakes in properties will go unnoticed. unevaluatedProperties:false > requires listing existing properties (present in example and in other > regulators of this device). > > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > --- > Documentation/devicetree/bindings/mfd/st,stpmic1.yaml | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/Documentation/devicetree/bindings/mfd/st,stpmic1.yaml b/Documentation/devicetree/bindings/mfd/st,stpmic1.yaml > index 97c61097f9e2..1a1ced489ef7 100644 > --- a/Documentation/devicetree/bindings/mfd/st,stpmic1.yaml > +++ b/Documentation/devicetree/bindings/mfd/st,stpmic1.yaml > @@ -189,6 +189,16 @@ properties: > > "^(buck[1-4]|ldo[1-6]|boost|vref_ddr|pwr_sw[1-2])$": > $ref: ../regulator/regulator.yaml > + unevaluatedProperties: false > + > + properties: > + interrupts: > + maxItems: 1 > + > + st,mask-reset: > + description: mask reset for this regulator, the regulator configuration > + is maintained during pmic reset. > + $ref: /schemas/types.yaml#/definitions/flag After further testing I see this patch is wrong. There are already buck[1-4] entries, so this is duplicating things. I will send v2. Best regards, Krzysztof
On Tue, 25 Jul 2023, Krzysztof Kozlowski wrote: > On 25/07/2023 14:37, Krzysztof Kozlowski wrote: > > Each regulator node, which references common regulator.yaml schema, > > should disallow additional or unevaluated properties. Otherwise > > mistakes in properties will go unnoticed. unevaluatedProperties:false > > requires listing existing properties (present in example and in other > > regulators of this device). > > > > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > > --- > > Documentation/devicetree/bindings/mfd/st,stpmic1.yaml | 10 ++++++++++ > > 1 file changed, 10 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/mfd/st,stpmic1.yaml b/Documentation/devicetree/bindings/mfd/st,stpmic1.yaml > > index 97c61097f9e2..1a1ced489ef7 100644 > > --- a/Documentation/devicetree/bindings/mfd/st,stpmic1.yaml > > +++ b/Documentation/devicetree/bindings/mfd/st,stpmic1.yaml > > @@ -189,6 +189,16 @@ properties: > > > > "^(buck[1-4]|ldo[1-6]|boost|vref_ddr|pwr_sw[1-2])$": > > $ref: ../regulator/regulator.yaml > > + unevaluatedProperties: false > > + > > + properties: > > + interrupts: > > + maxItems: 1 > > + > > + st,mask-reset: > > + description: mask reset for this regulator, the regulator configuration > > + is maintained during pmic reset. > > + $ref: /schemas/types.yaml#/definitions/flag > > After further testing I see this patch is wrong. There are already > buck[1-4] entries, so this is duplicating things. I will send v2. Are you still planning on resending this set?
On Fri, 18 Aug 2023, Krzysztof Kozlowski wrote: > On 17/08/2023 13:52, Lee Jones wrote: > > On Tue, 25 Jul 2023, Krzysztof Kozlowski wrote: > > > >> On 25/07/2023 14:37, Krzysztof Kozlowski wrote: > >>> Each regulator node, which references common regulator.yaml schema, > >>> should disallow additional or unevaluated properties. Otherwise > >>> mistakes in properties will go unnoticed. unevaluatedProperties:false > >>> requires listing existing properties (present in example and in other > >>> regulators of this device). > >>> > >>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > >>> --- > >>> Documentation/devicetree/bindings/mfd/st,stpmic1.yaml | 10 ++++++++++ > >>> 1 file changed, 10 insertions(+) > >>> > >>> diff --git a/Documentation/devicetree/bindings/mfd/st,stpmic1.yaml b/Documentation/devicetree/bindings/mfd/st,stpmic1.yaml > >>> index 97c61097f9e2..1a1ced489ef7 100644 > >>> --- a/Documentation/devicetree/bindings/mfd/st,stpmic1.yaml > >>> +++ b/Documentation/devicetree/bindings/mfd/st,stpmic1.yaml > >>> @@ -189,6 +189,16 @@ properties: > >>> > >>> "^(buck[1-4]|ldo[1-6]|boost|vref_ddr|pwr_sw[1-2])$": > >>> $ref: ../regulator/regulator.yaml > >>> + unevaluatedProperties: false > >>> + > >>> + properties: > >>> + interrupts: > >>> + maxItems: 1 > >>> + > >>> + st,mask-reset: > >>> + description: mask reset for this regulator, the regulator configuration > >>> + is maintained during pmic reset. > >>> + $ref: /schemas/types.yaml#/definitions/flag > >> > >> After further testing I see this patch is wrong. There are already > >> buck[1-4] entries, so this is duplicating things. I will send v2. > > > > Are you still planning on resending this set? > > > > I already did and you took it. Email subject was different, though: Understood, thanks for the clarification. > https://lore.kernel.org/all/20230726065633.74924-1-krzysztof.kozlowski@linaro.org/ > Best regards, > Krzysztof >
diff --git a/Documentation/devicetree/bindings/mfd/st,stpmic1.yaml b/Documentation/devicetree/bindings/mfd/st,stpmic1.yaml index 97c61097f9e2..1a1ced489ef7 100644 --- a/Documentation/devicetree/bindings/mfd/st,stpmic1.yaml +++ b/Documentation/devicetree/bindings/mfd/st,stpmic1.yaml @@ -189,6 +189,16 @@ properties: "^(buck[1-4]|ldo[1-6]|boost|vref_ddr|pwr_sw[1-2])$": $ref: ../regulator/regulator.yaml + unevaluatedProperties: false + + properties: + interrupts: + maxItems: 1 + + st,mask-reset: + description: mask reset for this regulator, the regulator configuration + is maintained during pmic reset. + $ref: /schemas/types.yaml#/definitions/flag "^ldo[1-2,5-6]$": type: object