From patchwork Fri Oct 6 08:22:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 149152 Return-Path: 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 + 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 ); 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 ) id 1qogBR-0007T2-IT; Fri, 06 Oct 2023 10:27:41 +0200 From: Martin Kaiser To: Linus Walleij , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue , Geert Uytterhoeven , Magnus Damm Cc: Martin Kaiser , 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 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: 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 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 Acked-by: Rob Herring --- 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(-) 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