From mboxrd@z Thu Jan 1 00:00:00 1970 From: arnd@arndb.de (Arnd Bergmann) Date: Tue, 23 Sep 2014 16:10:09 +0200 Subject: [PATCH v2 4/4] ARM: dts: mt8135: Add pinctrl node for mt8135. In-Reply-To: <1411480694.21299.18.camel@mtksdaap41> References: <1411443545-24951-1-git-send-email-srv_hongzhou.yang@mediatek.com> <2770365.r419rjIAOU@wuerfel> <1411480694.21299.18.camel@mtksdaap41> Message-ID: <7840459.vtELiqVIOL@wuerfel> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Tuesday 23 September 2014 21:58:14 Joe. C wrote: > Thanks for review. > The intend for these macros is helpin pinctrl user to write DT node. > With these macro, we could write like this for i2c0: > > mediatek,pinfunc = MT8135_PIN_101_SCL0__FUNC_SCL0>; > > We feel this is less error prone and easier to write than this: > > mediatek,pinfunc = But you don't actually use the same macros in the driver, so in effect you just move the definitions from the file they are needed in to another file as a macro. It is no less error prone to define those macros in mt8135-pinfunc.h than in the pinctrl node, just less readable. Arnd From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: [PATCH v2 4/4] ARM: dts: mt8135: Add pinctrl node for mt8135. Date: Tue, 23 Sep 2014 16:10:09 +0200 Message-ID: <7840459.vtELiqVIOL@wuerfel> References: <1411443545-24951-1-git-send-email-srv_hongzhou.yang@mediatek.com> <2770365.r419rjIAOU@wuerfel> <1411480694.21299.18.camel@mtksdaap41> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Return-path: In-Reply-To: <1411480694.21299.18.camel@mtksdaap41> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: "Joe. C" Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Mark Rutland , devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, "Hongzhou. Yang" , Vladimir Murzin , Russell King , Pawel Moll , srv_heupstream-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org, Ian Campbell Hongzhou Yang , Catalin Marinas , Linus Walleij , Ashwin Chaugule , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Grant Likely , Rob Herring , Sascha Hauer , Kumar Gala , Matthias Brugger , dandan.he-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org List-Id: devicetree@vger.kernel.org On Tuesday 23 September 2014 21:58:14 Joe. C wrote: > Thanks for review. > The intend for these macros is helpin pinctrl user to write DT node. > With these macro, we could write like this for i2c0: > > mediatek,pinfunc = MT8135_PIN_101_SCL0__FUNC_SCL0>; > > We feel this is less error prone and easier to write than this: > > mediatek,pinfunc = But you don't actually use the same macros in the driver, so in effect you just move the definitions from the file they are needed in to another file as a macro. It is no less error prone to define those macros in mt8135-pinfunc.h than in the pinctrl node, just less readable. Arnd -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756118AbaIWOLV (ORCPT ); Tue, 23 Sep 2014 10:11:21 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:61740 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751978AbaIWOLS (ORCPT ); Tue, 23 Sep 2014 10:11:18 -0400 From: Arnd Bergmann To: "Joe. C" Cc: linux-arm-kernel@lists.infradead.org, Mark Rutland , devicetree@vger.kernel.org, "Hongzhou. Yang" , Vladimir Murzin , Russell King , Pawel Moll , srv_heupstream@mediatek.com, Ian Campbell , Hongzhou Yang , Catalin Marinas , Linus Walleij , Ashwin Chaugule , linux-kernel@vger.kernel.org, Grant Likely , Rob Herring , Sascha Hauer , Kumar Gala , Matthias Brugger , dandan.he@mediatek.com Subject: Re: [PATCH v2 4/4] ARM: dts: mt8135: Add pinctrl node for mt8135. Date: Tue, 23 Sep 2014 16:10:09 +0200 Message-ID: <7840459.vtELiqVIOL@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <1411480694.21299.18.camel@mtksdaap41> References: <1411443545-24951-1-git-send-email-srv_hongzhou.yang@mediatek.com> <2770365.r419rjIAOU@wuerfel> <1411480694.21299.18.camel@mtksdaap41> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V02:K0:ljzHxTKvVMHx6TC6lMSG8vL3knsSD93lo4KVoAqXxux j3wcolafbenEoReGs7mx2ekgZuiONb6W7r7rHLc8SLQGF2aDNQ pYqIx9R/MSJ0faOJf56Bz9CwjtuqK03mEdZrsToNWjG5k/4o4n ZDujhFEsT/Eh0tWssMc3YkV3AkRqq8/oZobspAkw0sY2Dq99zA vV3jAILHelRqwaNDvDoAXIhzrxUqRpLIzInDK5mllJnVRjWpqm fHQE7PRKt74ExQZ9XbPFQMAg9+CW4C//Qg6+WGk1D3phkM8QH8 M0UHNj8agcot7NniIuZOtvBoz6PrntuusglwWcDWaBnCElNXo7 AfmsjHzc/XTuMx+mdtUs= X-UI-Out-Filterresults: notjunk:1; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday 23 September 2014 21:58:14 Joe. C wrote: > Thanks for review. > The intend for these macros is helpin pinctrl user to write DT node. > With these macro, we could write like this for i2c0: > > mediatek,pinfunc = MT8135_PIN_101_SCL0__FUNC_SCL0>; > > We feel this is less error prone and easier to write than this: > > mediatek,pinfunc = But you don't actually use the same macros in the driver, so in effect you just move the definitions from the file they are needed in to another file as a macro. It is no less error prone to define those macros in mt8135-pinfunc.h than in the pinctrl node, just less readable. Arnd