Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1162862AbbKFU3Q (ORCPT ); Fri, 6 Nov 2015 15:29:16 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:61123 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161222AbbKFU3K (ORCPT ); Fri, 6 Nov 2015 15:29:10 -0500 From: Arnd Bergmann To: Moritz Fischer Cc: Linus Walleij , linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Rob Herring , "pawel.moll@arm.com" , Mark Rutland , Ian Campbell , Kumar Gala , devicetree@vger.kernel.org Subject: Re: [RFC 3/3] ARM: e3xx: Add header file for pinctrl constants Date: Fri, 06 Nov 2015 21:28:53 +0100 Message-ID: <4489852.SMA0lELne9@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: References: <1446766883-25703-1-git-send-email-moritz.fischer@ettus.com> <4813305.v3X2DlHJmB@wuerfel> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:HvCzRGEVv1lhAF7hVqeefab25J2E3BiNCbA1PNFdrkWRXGHzTvL f15gXP+opA+z9DNO2/zybgRs1d/daVgD3A6uGgVBV3tXQBe/c0WZtlx5MslGI6cYTvaubIX QaKJt4DSgTeY8q0UhM3DrmQKFnolGyqRBT1/9VpytBqAusyZVL6013iXe9hwzqciOVmC2hv pflwsKW1u/pYhgQxMf1lg== X-UI-Out-Filterresults: notjunk:1;V01:K0:CiGYSv2vr+g=:NBmqg9JfLFQJ+Z4bbV2BGz TvnJg/GMQAU2f4dkk0Bwmtpc1WapH2/80thRpoQgjVK/eCraNbYMWBID5yA8Dmiw/Tg6NVy32 oDPPmIPXoEcrs6xWZt8Q6pclOaklCyfc3H4bkknOEguXHPsl7IGRe+bQdR9bFj9NSptPGWUe4 LfqYppm/6G04OdTFJJbUhaG37EC+JVDpFkzVONfaBz0DcacHIljrJpvECizcVgvxLawbxrAKa Ye+19KK+DBkWpcZFsU49Ztth91RJ5xNJuecOCcxC6FRG6+vv6+DgkXFl2s94lOTT9f0FUiqs5 6odsbLP9L6GKR4zFdXOwFY9nCd9hkbdiZd++h5dfzJ4ml91w/rLjePi4HdmbOZwU8H0ioY2LT sMevEO+siD+4YFGveG9Cz0rvHJxKT3yaQfmhNnGhEjewP38vBLhw9jKKgs0kTbC4ethLNuf1T uNjH64JpycMeuwIP7qkeMp1m9N2WHlEOHWxuXmnUIWxsnoEfQVumBLtJqxGzoaYCbHuGQ5g50 XeDN5KF33uLWfKqDggg9cAZ0hDoXoE+d6hnUFsx1tLFfmXx14nWb0R/cWTwRNzSurVo0jQan9 V2oaintQF+8diBxqY0ZhnXDPAZvFIuQ7n1/+LlRfnY9mOJdMAk7v2TWWI/6vxF/B2feNANu7A jmS19NLTQ4JGTOSxaR9mtVDDG15IHHxR5y2uB4rmJZhriscJ2YlYzbfkcitFuzm2Sbpk4Pw6P T4Zv0vCrdlFujf8/ Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1525 Lines: 37 On Friday 06 November 2015 09:55:28 Moritz Fischer wrote: > On Fri, Nov 6, 2015 at 8:42 AM, Arnd Bergmann wrote: > > On Friday 06 November 2015 08:01:25 Moritz Fischer wrote: > >> pins = E31X_TX_BANDSEL_2; > >> output-low; > >> > >> in one .dts, while having something like > >> > >> pins = E33X_TX_BANDSEL_2 > >> output low; > >> > >> in the second dts > > > > That doesn't seem helpful though, because the assignment of the > > pins is not hidden from the source file that should be documenting > > it: if someone wants to know how the pins are muxed, they now have > > to cross-reference the dts file with the header. If you just put the > > pin number directly into the dts, it becomes completely clear > > what the setting is. > > Just to clarify, you're suggesting using "DB_0" etc in the dts file? > At that point > the name becomes kinda useless. I found the PINCTRL_PIN_ANON macro, > but haven't found any use throughout the tree, is using it discouraged? I don't know if that is the best approach, but it's better than using macros here. You should only add a header file with macros if you absolutely have to define a common namespace between the driver and the dts files, but you don't do that here: the header file is only used in one place. Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/