Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2157323imm; Thu, 27 Sep 2018 08:17:19 -0700 (PDT) X-Google-Smtp-Source: ACcGV63XQ2BPbS8quKTOX/HXmnFU8eZLEPaHuvgfDkAbAyce3V4MKpfNaNm/WNV2FQoNKKBLY2aP X-Received: by 2002:a62:5c03:: with SMTP id q3-v6mr12195027pfb.182.1538061439071; Thu, 27 Sep 2018 08:17:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538061439; cv=none; d=google.com; s=arc-20160816; b=deOWUlm0WXBuUnVWjI69eR0/WUyyCfxd1kvdIEd6GlkkztpLBIIT37QK/KJgy9jqCf qD++OEmq64T2zLGNejqgtgKvnrrUrRF5Fl+5jVyARZY7YoHeumUnw8rA8bhUw6AT8bIx hoakmm2kf27Sa3LnIl6pSIiltyYGX04OYb1DPUBn4GJL6zBMDdUjp23VjB49zirmTxI8 C3bit14R9a+BguJ+GluPEH9ifg3fwmaeKFXVsTCdYsoenIv9Twx7mGnpL8HhItPsHUt9 CzBrztJvoj3GOow5kYLPuWCJPUfjpTo4NUQDtLieeKzYODkC1X3CN5S7wwC50nGQH1L1 6PnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=jvIm1UyrIJkQt7vWM+wkyVG5hv9Y0kBl6OEFUHju/eg=; b=TLR3B1xfp0QPlkKX6Rrbpjrk+KUTsolNY7ZXv0MC74cRr4SzihWKHerPfMEIgG41dK 7BrnCsLOQyieJsEtZ6uYBNQRXdJ9wd83rOxTasCar4MxtSnuIBt8YA+VLPaU/XFQSCp4 UHmBA9LCkFbOrRuOHomw4qvszTKZ7MxWs+tphwLbSnWqEdjSWQ6eY3/QeR86rKx3l575 RWHoB7bHjfMwghy5nVKrALblnbblTeAZ7U1aZUN74zWmR9Fr+c7pyS2+Ruoxf4DT1nSf wpjzNV3+PJaKmkgqKrjvAsJJxoudJts0FMDfHxZiHwTyBA45yyzOXzUeUAzSC3wmUj/l EpJw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 62-v6si2219487ply.520.2018.09.27.08.16.42; Thu, 27 Sep 2018 08:17:19 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728213AbeI0Vew (ORCPT + 99 others); Thu, 27 Sep 2018 17:34:52 -0400 Received: from mail-vs1-f66.google.com ([209.85.217.66]:42164 "EHLO mail-vs1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727341AbeI0Vew (ORCPT ); Thu, 27 Sep 2018 17:34:52 -0400 Received: by mail-vs1-f66.google.com with SMTP id w16-v6so1707752vso.9; Thu, 27 Sep 2018 08:16:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jvIm1UyrIJkQt7vWM+wkyVG5hv9Y0kBl6OEFUHju/eg=; b=TotubeZMcpZa3+Ea1yMEQCBzrXT/SBFwNrM0YTjREokApx6FGy2UICpZQCCuwk6bbC SIxRX2W3OE0G5PfZJj6UK/45qrZW6+4arxIRnWQ+Do8b111ox0kEUjR/MqypFve3UdUw JrIxjSw2fN+/l3fjh2O4v9YGsIpJs/ugIKvZtcXZHVf/XsPOxij+qgRloHrBkNwJBQFF bRqNm/uQEWWxh2mGOI68bOSI7mLMFnFpHA7ssNK443uwKDmfyI7RvKoyzcXjuKTkCE1y qG2rCG+yWceTSR5Ud8oA1PhSPKu/Cb9jkai/K0isJlgs7pjyc7r/F/U9JL9GVJgfifvl SWkA== X-Gm-Message-State: ABuFfojqpEZBEGka7nOxrekyRaRpDsJ+vT99uy7XcXEXJ8KqxNkfAe7S jsdgR7fAtFOs/RIS4vS7ghQifctjilTbhtJZPJM= X-Received: by 2002:a67:68ce:: with SMTP id d197-v6mr2550752vsc.152.1538061367250; Thu, 27 Sep 2018 08:16:07 -0700 (PDT) MIME-Version: 1.0 References: <20180927135922.12015-1-phil.edworthy@renesas.com> <20180927135922.12015-2-phil.edworthy@renesas.com> In-Reply-To: <20180927135922.12015-2-phil.edworthy@renesas.com> From: Geert Uytterhoeven Date: Thu, 27 Sep 2018 17:15:54 +0200 Message-ID: Subject: Re: [PATCH v6 1/3] dt-bindings: pinctrl: renesas,rzn1-pinctrl: documentation To: Phil Edworthy , Rob Herring Cc: 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" Content-Type: text/plain; charset="UTF-8" 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 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. Rob: Is this really what you intended? Thanks! Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds