From patchwork Tue Jan 23 18:46:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Th=C3=A9o_Lebrun?= X-Patchwork-Id: 191137 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2553:b0:103:945f:af90 with SMTP id p19csp539224dyi; Tue, 23 Jan 2024 10:51:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IFQyF9izYp9SFpGvAqwABy4pIYm9CIVrvIMQTmXNVFIswn8NIRwC+NA4nIDeyqJvMVOgwPW X-Received: by 2002:aa7:ce04:0:b0:55a:6e81:7ec6 with SMTP id d4-20020aa7ce04000000b0055a6e817ec6mr569783edv.120.1706035901216; Tue, 23 Jan 2024 10:51:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706035901; cv=pass; d=google.com; s=arc-20160816; b=xxfx7sDs1k4rmYuVoOU/mrYCAJPBTE29/3gpGoIlKvru28mbPu9CfjFVZwM9wHEw7Y LJ/vNX6e5836UxCHB3bRTu9PSzO4EYzE8VK0V70Q7LJ1O9Z9wiAx9oIdj4tO0kN0JJxw xgjlj6z/AIEyLCFUWfrJ345vkTbhZowA5WfGRn/HXBXyfMR9xAeMImVxmk41uxpsypcf I+82LRVybLOPugCMgdeKC3GaXpKxGJaA13Ibp09eCIVSYOWquImBDNaTxXpa3kDGKGVP odEBExQMC1xQjAcb3ALN6BwoW730KEOShfHwZoVyjlDeNWWhYpeQ7MNVSQvWUMpqUEQ3 w46A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=N6AavcBVCvaawd7cYcf6aSbn1cIf/DssL30p1KzHtXk=; fh=x5R05joZrGxebVEAaczvDRwH1m7BAJpjuUh/Gh1YI/Y=; b=HKrf4hZcjwCM3/6tu9hmfNb/IX6PWtDFRG5ytpdiFJLiq3SgOyVcSTKbzjIgp48AOH mqNV/3CND4i1gnfwsaWJC6SRplgxSGxC4AZ9cz2TgnXnJzeGGJjzwpPMfP6y93AkCfNF GpdqP6/fCXJf25rDIhPy5tQSDWn5Tg1pD8EZ5tSyH9IZmkraew2d3SQlCiSFK6AwxGL6 398cDFfI1+3lsF/R466mQKTxeWKlStXvqoDig1Q0r0x1Th3vZtJZmx1x1PALN9XYNO45 ZOlvUYMsZSAU6yiWl+6o7CNOkvVScJxmpgKQQxOuwVK5SCCDAhEyiJfCEKXCIDnaJS8o W0/w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=PErsHF0l; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-35901-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35901-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id fd2-20020a056402388200b005597f92d6b4si8694005edb.325.2024.01.23.10.51.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 10:51:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-35901-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=PErsHF0l; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-35901-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35901-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com 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 D07161F2318D for ; Tue, 23 Jan 2024 18:51:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BA70412BE88; Tue, 23 Jan 2024 18:47:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="PErsHF0l" Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) (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 A8542823BB; Tue, 23 Jan 2024 18:47:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.198 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706035634; cv=none; b=gmgsZHAScFMApfKkD5hB2IQJ3RcrM13tc4lREtXxRv//a2hAYJKO4dyQmBGh7y8kmfqUYr2UZpPq3mjuJtxPQ6N+4M9jluGlyjh93wdym6RRvWnvYNyZNkONM1W3qDhBoU1YSyqHgrMLMV/8NmI1F6MfjY1+yfSmPRITYH5SKVI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706035634; c=relaxed/simple; bh=N43qmnGdH3FjGPsQyVkKZkyqKnkD4RpFi5SkZgTGhjI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Nh3pnQVzUJuDTQmocKVLH6YIrHG/FM67R81m+Rf9XkCgwT1Qg2SupI+mUnShMtREonEiUHD9Q/LjAWRDSEXS40TmNd5yj6/Z3BNDTNd3mtU8nPn2T7tLvjgafGjmyHECbcbGr02vi73qu8Agvyu5oDoDaw24ExuYDsXuIdcOUjs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=PErsHF0l; arc=none smtp.client-ip=217.70.183.198 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 4CBCDC0008; Tue, 23 Jan 2024 18:47:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1706035624; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=N6AavcBVCvaawd7cYcf6aSbn1cIf/DssL30p1KzHtXk=; b=PErsHF0l8WZFgc0DRJjp9lTsjBxy98WpCcJ/HGoCJLK5hbF0FE4gX/NUWxJeCYNBS+3/Cf vRhiT6eQ6RKvmF6rYZClNfDspY74WT7IA4yrECCj/TOwlce2/Y/dfiyYegNVxEI9sC7Q7p nvScDQGLWsB8IP8QYZh/VTnBlenS0OptpIjuAbey1Gt9b5QBuTIe9XnTAoc/+S2mgmB4Fd 9DeK5huYRH3DZJunlIBZWdmdF0cTpnAfBLKncfdOKSDqHfGrVdqj5RnB0FxIZDHvswVqPJ BpTEJ1IKRc+y2tU5tXVfPTGDHvyRVqcEnBfBXgbrkO6UvkcOCxB7Qkg7UjjNzA== From: =?utf-8?q?Th=C3=A9o_Lebrun?= Date: Tue, 23 Jan 2024 19:46:48 +0100 Subject: [PATCH v3 03/17] dt-bindings: pinctrl: allow pin controller device without unit address Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240123-mbly-clk-v3-3-392b010b8281@bootlin.com> References: <20240123-mbly-clk-v3-0-392b010b8281@bootlin.com> In-Reply-To: <20240123-mbly-clk-v3-0-392b010b8281@bootlin.com> To: Gregory CLEMENT , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thomas Bogendoerfer , Linus Walleij , =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , Philipp Zabel Cc: Vladimir Kondratiev , linux-mips@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Petazzoni , Tawfik Bayouk , linux-gpio@vger.kernel.org, =?utf-8?q?Th=C3=A9o_Lebrun?= X-Mailer: b4 0.12.4 X-GND-Sasl: theo.lebrun@bootlin.com X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788908301213860920 X-GMAIL-MSGID: 1788908301213860920 Allow a pin controller device to have no address, therefore no unit address. The previous $nodename was enforcing a unit address, but scripts/dtc/checks.c enforced that names with unit addresses have reg or ranges: Warning (unit_address_vs_reg): .../pinctrl@0: node has a unit name, but no reg or ranges property Fix pinctrl.yaml to adopt a (pinctrl|pinmux)(-[a-z]+)? node name when neither reg nor ranges are required. Use [a-z]+ to avoid conflicts with pinctrl-consumer.yaml. Signed-off-by: Théo Lebrun --- Documentation/devicetree/bindings/pinctrl/pinctrl.yaml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/pinctrl.yaml index d471563119a9..1f1239c9b94d 100644 --- a/Documentation/devicetree/bindings/pinctrl/pinctrl.yaml +++ b/Documentation/devicetree/bindings/pinctrl/pinctrl.yaml @@ -26,9 +26,6 @@ description: | controller device. properties: - $nodename: - pattern: "^(pinctrl|pinmux)(@[0-9a-f]+)?$" - "#pinctrl-cells": description: > Number of pin control cells in addition to the index within the pin @@ -42,4 +39,19 @@ properties: This property can be set either globally for the pin controller or in child nodes for individual pin group control. +if: + anyOf: + - required: + - reg + - required: + - ranges +then: + properties: + $nodename: + pattern: "^(pinctrl|pinmux)(@[0-9a-f]+)?$" +else: + properties: + $nodename: + pattern: "^(pinctrl|pinmux)(-[a-z]+)?$" + additionalProperties: true