From patchwork Wed Oct 9 05:42:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 3006401 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E2AA6BF924 for ; Wed, 9 Oct 2013 05:42:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0BE4A2015F for ; Wed, 9 Oct 2013 05:42:47 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BCA8A20149 for ; Wed, 9 Oct 2013 05:42:45 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VTmXe-0000aM-2L; Wed, 09 Oct 2013 05:42:38 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VTmXb-0007FN-QF; Wed, 09 Oct 2013 05:42:35 +0000 Received: from am1ehsobe005.messaging.microsoft.com ([213.199.154.208] helo=am1outboundpool.messaging.microsoft.com) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VTmXY-0007Ez-El for linux-arm-kernel@lists.infradead.org; Wed, 09 Oct 2013 05:42:33 +0000 Received: from mail77-am1-R.bigfish.com (10.3.201.225) by AM1EHSOBE017.bigfish.com (10.3.207.139) with Microsoft SMTP Server id 14.1.225.22; Wed, 9 Oct 2013 05:42:04 +0000 Received: from mail77-am1 (localhost [127.0.0.1]) by mail77-am1-R.bigfish.com (Postfix) with ESMTP id 13BB3380125; Wed, 9 Oct 2013 05:42:04 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: 0 X-BigFish: VS0(zzzz1f42h208ch1ee6h1de0h1fdah2073h1202h1e76h1d1ah1d2ah1fc6hzz1de098h1de097h8275dhz2dh87h2a8h839hd24he5bhf0ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1ad9h1b0ah1b2fh1fb3h1d0ch1d2eh1d3fh1dc1h1dfeh1dffh1e23h1fe8h1ff5h1151h1155h) X-FB-DOMAIN-IP-MATCH: fail Received: from mail77-am1 (localhost.localdomain [127.0.0.1]) by mail77-am1 (MessageSwitch) id 138129732259076_4924; Wed, 9 Oct 2013 05:42:02 +0000 (UTC) Received: from AM1EHSMHS006.bigfish.com (unknown [10.3.201.247]) by mail77-am1.bigfish.com (Postfix) with ESMTP id 0A5DE3400C7; Wed, 9 Oct 2013 05:42:02 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by AM1EHSMHS006.bigfish.com (10.3.207.106) with Microsoft SMTP Server (TLS) id 14.16.227.3; Wed, 9 Oct 2013 05:42:01 +0000 Received: from az84smr01.freescale.net (10.64.34.197) by 039-SN1MMR1-004.039d.mgd.msft.net (10.84.1.14) with Microsoft SMTP Server (TLS) id 14.3.158.2; Wed, 9 Oct 2013 05:41:59 +0000 Received: from S2101-09.ap.freescale.net ([10.192.185.121]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id r995fqQF005968; Tue, 8 Oct 2013 22:41:53 -0700 From: Shawn Guo To: Subject: [PATCH] pinctrl: phandle entries will be applied sequentially Date: Wed, 9 Oct 2013 13:42:04 +0800 Message-ID: <1381297324-19006-1-git-send-email-shawn.guo@linaro.org> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-OriginatorOrg: sigmatel.com X-FOPE-CONNECTOR: Id%0$Dn%*$RO%0$TLS%0$FQDN%$TlsDn% X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131009_014232_796943_F6117553 X-CRM114-Status: GOOD ( 12.35 ) X-Spam-Score: -1.9 (-) Cc: Linus Walleij , Shawn Guo , Russell King - ARM Linux , linux-arm-kernel@lists.infradead.org, Stephen Warren X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP It's naturally expected that when there are multiple phandle entries specified in pinctrl-* property, these entries will be applied sequentially. And this is how Linux kernel works. So let's define this behavior in the binding doc. The behavior is useful when people want to reuse a group of predefined pins with only minor configuration adjustment on one particular pin. They will only need to add another entry after the predefined one with needed configuration on that particular pin to overwrite the predefined configuration. Signed-off-by: Shawn Guo --- .../bindings/pinctrl/pinctrl-bindings.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt index 1958ca9..404ba32 100644 --- a/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt +++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt @@ -50,7 +50,13 @@ pinctrl-0: List of phandles, each pointing at a pin configuration entries may exist in this list so that multiple pin controllers may be configured, or so that a state may be built from multiple nodes for a single pin controller, each - contributing part of the overall configuration. See the next + contributing part of the overall configuration. These entries + will be applied sequentially. If there are multiple entries + contributing the configuration of the same pin, the latter + will overwrite the former. However, this 'overwrite' mechanism + should be used with the caution that it could cause some ill + effect, e.g. a glitch on the pin when pull down/up setting + gets flipped in this 'overwrite'. See the next section of this document for details of the format of these pin configuration nodes.