Message ID | 20231006082247.3830719-1-martin@kaiser.cx |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a888:0:b0:403:3b70:6f57 with SMTP id x8csp167960vqo; Fri, 6 Oct 2023 01:28:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF7MshmvWQHSE8xN5fFiFZcgkSA+jBOOwAz7LfcCQoDVcXFzLVqrs7PjJQavKN1DFmcUErT X-Received: by 2002:a17:902:d2d1:b0:1c3:bbad:9b7c with SMTP id n17-20020a170902d2d100b001c3bbad9b7cmr8576823plc.31.1696580891972; Fri, 06 Oct 2023 01:28:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696580891; cv=none; d=google.com; s=arc-20160816; b=oMgAYutyqLNx13jfB2CqOSeodUfcw7fqRIG4DZ459C+t96/U+h9AoA5PkLZNTA/tuf rvrnWD1/iQGaGstsC12hJs3HHiAUtDn6vy9wbtoAMo2OduGpdt7fQxK2eBJ44eiBsUHS LHuETdPY3OalhV5oTAkQkllmLpY19i7tYuGfCam7Gkz9+UUHlGsDOKkjJxxRD5V9RmX0 qq3kq19qkDxnGco2iSZySz1AqvuqfTItOYXtIrF0wRqnRjiaSrFPRvllo+Lz5Xdu1NIT 6rBMyud+eX2v4w1SJ+NlUMBM1l8gHpV0jAnHsfyI/B8D2Hafv/v3p7WfE0cUvJl6k/FL qfVQ== 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; bh=rPsmcw8u3EXO+3jiKoZoSxCbvVxt/uW0ZtntlbRq42Y=; fh=KAYZnU7m7+D91JwaUbI7ap1BaFVhrriaDaWhIpWxnVI=; b=yyWVvIpb/7CLY6PBOxuId6WD8zBK11UWG+/o4F5Efus+0K8QB4Q8lN2eJhHn/w5YLh M5KERm8/9leBx4ON3PqFOuMcWq4lRZR/XXITibrmMdptqDxX0JaGNOS32FC1kdcz4FNT X5lSjCiMPs9rnKU0jaTOE9TmpjKRxiv4Iwr+pg/tyMPEc05h2MLyZi/LAQmbHVjcuagp 8YhdQFupguUgKSgLJ7OpC156Trn2QOZiq5N3Ksnvl1o1uHOXev2PWWIPTcJqLhD7vum1 GeHp0AKH9pEfJvpIajOGYRlgKCvgIomK9YZ0KVo9jAGKGu7RwJ6YkS/k3iR+JEGcUaeg 1JoA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id kt5-20020a170903088500b001bbc138af0dsi2930797plb.163.2023.10.06.01.28.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 01:28:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 36CE180644E4; Fri, 6 Oct 2023 01:28:10 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231165AbjJFI16 (ORCPT <rfc822;ezelljr.billy@gmail.com> + 18 others); Fri, 6 Oct 2023 04:27:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230076AbjJFI1y (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 6 Oct 2023 04:27:54 -0400 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D77A95; Fri, 6 Oct 2023 01:27:52 -0700 (PDT) Received: from dslb-188-097-209-100.188.097.pools.vodafone-ip.de ([188.97.209.100] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from <martin@kaiser.cx>) id 1qogBR-0007T2-IT; Fri, 06 Oct 2023 10:27:41 +0200 From: Martin Kaiser <martin@kaiser.cx> To: Linus Walleij <linus.walleij@linaro.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Maxime Coquelin <mcoquelin.stm32@gmail.com>, Alexandre Torgue <alexandre.torgue@foss.st.com>, Geert Uytterhoeven <geert+renesas@glider.be>, Magnus Damm <magnus.damm@gmail.com> Cc: Martin Kaiser <martin@kaiser.cx>, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org Subject: [PATCH] dt-bindings: pinctrl: st,stm32: fix phandle-array warning Date: Fri, 6 Oct 2023 10:22:48 +0200 Message-Id: <20231006082247.3830719-1-martin@kaiser.cx> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Fri, 06 Oct 2023 01:28:10 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778994005087208198 X-GMAIL-MSGID: 1778994005087208198 |
Series |
dt-bindings: pinctrl: st,stm32: fix phandle-array warning
|
|
Commit Message
Martin Kaiser
Oct. 6, 2023, 8:22 a.m. UTC
make CHECK_DTBS=y st/stm32f469-disco.dtb
brings up a warning about a missing argument:
stm32f469-disco.dtb: pinctrl@40020000: st,syscfg:0: [21, 8] is too short
The description of the third entry indicates that this entry is optional.
The code in stm32_pctrl_dt_setup_irq parses st,syscfg and treats the third
entry as optional. It defaults to 0xf if not present in the devicetree.
Update the schema to require at least two entries, use the same syntax as
the description of renesas,ipmmu-main in
Documentation/devicetree/bindings/iommu/renesas,ipmmu-vmsa.yaml.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
I tested the following cases, all of them returned the expected result:
st,syscfg = <&syscfg>; (too short)
st,syscfg = <&syscfg 0x8>; (ok)
st,syscfg = <&syscfg 0x8 0x0>; (ok)
st,syscfg = <&syscfg 0x8 0x0 0x0>; (too long)
.../devicetree/bindings/pinctrl/st,stm32-pinctrl.yaml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Comments
On Fri, 06 Oct 2023 10:22:48 +0200, Martin Kaiser wrote: > make CHECK_DTBS=y st/stm32f469-disco.dtb > > brings up a warning about a missing argument: > > stm32f469-disco.dtb: pinctrl@40020000: st,syscfg:0: [21, 8] is too short > > The description of the third entry indicates that this entry is optional. > The code in stm32_pctrl_dt_setup_irq parses st,syscfg and treats the third > entry as optional. It defaults to 0xf if not present in the devicetree. > > Update the schema to require at least two entries, use the same syntax as > the description of renesas,ipmmu-main in > Documentation/devicetree/bindings/iommu/renesas,ipmmu-vmsa.yaml. > > Signed-off-by: Martin Kaiser <martin@kaiser.cx> > --- > > I tested the following cases, all of them returned the expected result: > > st,syscfg = <&syscfg>; (too short) > st,syscfg = <&syscfg 0x8>; (ok) > st,syscfg = <&syscfg 0x8 0x0>; (ok) > st,syscfg = <&syscfg 0x8 0x0 0x0>; (too long) > > .../devicetree/bindings/pinctrl/st,stm32-pinctrl.yaml | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > Acked-by: Rob Herring <robh@kernel.org>
On Fri, Oct 6, 2023 at 10:27 AM Martin Kaiser <martin@kaiser.cx> wrote: > make CHECK_DTBS=y st/stm32f469-disco.dtb > > brings up a warning about a missing argument: > > stm32f469-disco.dtb: pinctrl@40020000: st,syscfg:0: [21, 8] is too short > > The description of the third entry indicates that this entry is optional. > The code in stm32_pctrl_dt_setup_irq parses st,syscfg and treats the third > entry as optional. It defaults to 0xf if not present in the devicetree. > > Update the schema to require at least two entries, use the same syntax as > the description of renesas,ipmmu-main in > Documentation/devicetree/bindings/iommu/renesas,ipmmu-vmsa.yaml. > > Signed-off-by: Martin Kaiser <martin@kaiser.cx> Patch applied! Yours, Linus Walleij
diff --git a/Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.yaml index 2120ef71a78d..e1eb45a9eda4 100644 --- a/Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.yaml +++ b/Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.yaml @@ -48,7 +48,8 @@ properties: description: Phandle+args to the syscon node which includes IRQ mux selection. $ref: /schemas/types.yaml#/definitions/phandle-array items: - - items: + - minItems: 2 + items: - description: syscon node which includes IRQ mux selection - description: The offset of the IRQ mux selection register - description: The field mask of IRQ mux, needed if different of 0xf