Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2235365imm; Thu, 27 Sep 2018 09:27:41 -0700 (PDT) X-Google-Smtp-Source: ACcGV61i1y8VIa8wJu8XkqcTqUvrP6En9R6BTvwjn0Ro8ooa8ppQz8VH33Yi76/sYGz7j9Y24MXT X-Received: by 2002:a62:cf04:: with SMTP id b4-v6mr12389998pfg.224.1538065661441; Thu, 27 Sep 2018 09:27:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538065661; cv=none; d=google.com; s=arc-20160816; b=QQnsjyFBewBE1zCuA4vYQLXRCdqeW6zDHM+zXQvK4ONrVgCdghP5Z8RlrM/esnavtj ArsHzCI0NkinWj/Rz1j7v3u+UGQXZzNNjr+hZ7fUY7uORWBw3AAe0FBxD7x6jPwxRV6g lpoI4GKv3ZSzEv5rMuOEv3uU+T+Nw8J1FsvlhwxN/xNC+a3kMPb5owlsIvR7SriHZJb6 /nxsSsqwGeWZpxGccMamIBQvC8HblQaIGKkG0lgh4XWbW8T05K3K5HTvKv7oZGrvEyHJ KtNqMYl/+odrtS7V2f4oBrRPvyCRXeuvdhD0qmMjB7AhLB5yXBCQBkrTnxuk7yBrAmU6 0bow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=n6lNSPq1NzHISnnKGCeyMQBcSDeAsJqEd4ij+yR8RpA=; b=d8K0mYbo7mwsdoX4SMZw9/sNwgl7vjoh9fVxyV5BKnFpd+eCEr9hC8U3fKXgvgLIhZ lUpW9dLUyphrw8Mpj8hTESMOCM/+avfntW44ACN5r9ELpI1bwPcoTXNOIS0xtqy15ugA 4lk/VNkyo0G1EUsRKCg2eB7Jz37LSFf0kSsIAZVSxzS0enxy4Pq5KNfuKsmtJHRzjtNA 4Fz3d8KtWjLVNAQr2kDSBfUIAEYnDHeLlSoMj8uY03W1dKXnL8bU8VtBvSfxL0V08kVa QLd/xzo+nabArn5OHDkBuQVCJlc9yY2ZZ4wrze3PebkR4uZsr08SRmO+rG994t3eGJgI yZAw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p18-v6si1153563plr.423.2018.09.27.09.27.25; Thu, 27 Sep 2018 09:27:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728330AbeI0Wok (ORCPT + 99 others); Thu, 27 Sep 2018 18:44:40 -0400 Received: from mail-ot1-f68.google.com ([209.85.210.68]:33721 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727828AbeI0Wok (ORCPT ); Thu, 27 Sep 2018 18:44:40 -0400 Received: by mail-ot1-f68.google.com with SMTP id m23-v6so3184348otf.0; Thu, 27 Sep 2018 09:25:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=n6lNSPq1NzHISnnKGCeyMQBcSDeAsJqEd4ij+yR8RpA=; b=L8H525dqE4gxzXyhAwKzeru5OatOPV3QuIDzCX+0v7T4sGFUSI34IdO1Jd4Oh81XKV WGBncxmhnltR0NQsBEL/34cGM/Wg5teE+GvgmhWckwEjY7sp7g30VI45jorGTT4Qua7+ rSG1VcqBJtEllXfeNRdMPXw7icbH6XHguMtcs9f+8FQbFujbu9uNgA2Lkl2xt1rS5tfJ 6Lng3nQa6YML0UywiwbWIdrrTnDbovd/vv7BWrKs0l9wQbORAR2OptA/HXaIqy7NfDDw hXzufefDoYoVfQjoFD1HrYaDt3A9gctxT+eBhh2Hjy44J3embG22jgz/A7+a7aPmx/Kj YaLQ== X-Gm-Message-State: ABuFfog4eotccwodfQsL93Xs0/1niQrwKwtK6f6Ufp/ibMh3fUn4oa4H TjS2cA6dzI5xppx/ozu6+UPiMXG7jQ== X-Received: by 2002:a9d:248:: with SMTP id 66-v6mr7737582otb.366.1538065538013; Thu, 27 Sep 2018 09:25:38 -0700 (PDT) Received: from localhost (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id e205-v6sm1097074oia.9.2018.09.27.09.25.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 27 Sep 2018 09:25:37 -0700 (PDT) Date: Thu, 27 Sep 2018 11:25:36 -0500 From: Rob Herring To: Geert Uytterhoeven Cc: Phil Edworthy , Laurent Pinchart , Mark Rutland , Jacopo Mondi , Linus Walleij , Simon Horman , "open list:GPIO SUBSYSTEM" , Linux-Renesas , Linux Kernel Mailing List , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" Subject: Re: [PATCH v6 1/3] dt-bindings: pinctrl: renesas,rzn1-pinctrl: documentation Message-ID: <20180927162536.GA16329@bogus> References: <20180927135922.12015-1-phil.edworthy@renesas.com> <20180927135922.12015-2-phil.edworthy@renesas.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 27, 2018 at 05:15:54PM +0200, Geert Uytterhoeven wrote: > On Thu, Sep 27, 2018 at 3:59 PM Phil Edworthy wrote: > > The Renesas RZ/N1 device family PINCTRL node description. > > > > Based on a patch originally written by Michel Pollet at Renesas. > > > > Signed-off-by: Phil Edworthy > > Reviewed-by: Jacopo Mondi > > --- > > v6: > > - Instead of combining the pin nr and func into a single element, use > > a pair of 8-bit elements. > > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/pinctrl/renesas,rzn1-pinctrl.txt > > > +- Pin multiplexing sub-nodes: > > + A pin multiplexing sub-node describes how to configure a set of > > + (or a single) pin in some desired alternate function mode. > > + A single sub-node may define several pin configurations. > > + Please refer to pinctrl-bindings.txt to get to know more on generic > > + pin properties usage. > > + > > + The allowed generic formats for a pin multiplexing sub-node are the > > + following ones: > > + > > + node-1 { > > + pinmux = /bits/ 8 , , ... ; > > + GENERIC_PINCONFIG; > > + }; > > and > > > + Example: > > + A serial communication interface with a TX output pin and an RX input pin. > > + > > + &pinctrl { > > + pins_uart0: pins_uart0 { > > + pinmux = /bits/ 8 < > > + 103 RZN1_FUNC_UART0_I /* UART0_TXD */ > > + 104 RZN1_FUNC_UART0_I /* UART0_RXD */ > > + >; > > + }; > > + }; > > So the above is in response to Rob's comment on v4: > > | > +#define RZN1_MUX(_gpio, _func) \ > | > + (((RZN1_FUNC_##_func) << 8) | (_gpio)) > | > | I'm not a fan of token pasting and it also goes against kernel style. > | If every other Renesas platform is doing this, then fine. Otherwise, > | you can express it in pretty much the same (source) space: > | > | pinmux = ; > | > | Yes, this is 2 cells instead of 1, but if you care about space, you > | can use 8 or 16 bit size. > > I'm not so much impressed by the "/bits/ 8" part. > No other pinctrl bindings uses this. > We do have RZA1_PINMUX() and STM32_PINMUX() macros. Yes, but those aren't doing token pasting which was my complaint here. > Rob: Is this really what you intended? Do whatever is most consistant. If you want a macro to shift fields, then fine. Rob