Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1032995AbbKFIzE (ORCPT ); Fri, 6 Nov 2015 03:55:04 -0500 Received: from mout.kundenserver.de ([212.227.126.131]:55684 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031997AbbKFIzB (ORCPT ); Fri, 6 Nov 2015 03:55:01 -0500 From: Arnd Bergmann To: Moritz Fischer Cc: linus.walleij@linaro.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com, ijc+devicetree@hellion.org.uk, galak@codeaurora.org, devicetree@vger.kernel.org Subject: Re: [RFC 3/3] ARM: e3xx: Add header file for pinctrl constants Date: Fri, 06 Nov 2015 09:54:46 +0100 Message-ID: <3715539.QztuvljIIp@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <1446766883-25703-4-git-send-email-moritz.fischer@ettus.com> References: <1446766883-25703-1-git-send-email-moritz.fischer@ettus.com> <1446766883-25703-4-git-send-email-moritz.fischer@ettus.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:xKSektbijdB068rC6KID9mR91RKigB/eOQN+aNKkT1XrLneq5OR o1Erd6jPYUbwDgUcBjidKdS35wZE0VRmHiYphIauc4Z7Xa8sLRbWplzxIbuYnP3Jl9qCO3q jLysWSD+4YatvB9IeWeP8EMyiKYNrYbTsUhq9sv5lJo6blgkzxuhyq2mqAY+AxQ2BSTN2DH 5/r2TereLQOHnldgM+NqQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:McbOaA/c0ms=:POX/clthhZkA1M54TtxRZV V5erhrm7scszvg07OCfIFQL9JjqrfHD+ROHd402ye31uXKWbFRVE/mqs4XfCYbalw0nkZnKlA 3OjsznWpQMvwo4cat8uP3RHXnTQ3z3nIYASq3Kj/0VooXTwpZmoN1Ws25uiX8xKAkNt+0rl1r fKYT9PF9o1sW9zdu+EonK3wx7CIi/O60YIjtXbmXiAsmo5p9Kwg+ppFnz6FTt/schUU3mw6OI ECxwsFy0JKctps5mqVIv2TaJ9dwRUHTZc7Cbudh+irfQ60x98vYZm9TAChzwB0SFCnzNBVkeF 8/9hzyyNslIW2j14Q5nmcIFQMSCh3AJAZJaL2ZBLnGIpeHHyF3PhOzCak7LTBkbDibIU5+Gop 1lAd+3BZNsBUBeayDVYEpgFw/sCdxbWa4iBTyZ5tauQYELkezw6FLRyedxJgbSkfccXFj6gjh CLBL6+FnWwgI58NczI7pXtSW0mnKjfPJA8T5AC0W74P/9iehzR+rogaRNgSV894/bha6Lnd94 TgXgx+BlV5M52di8+T9erzTgvTWC4G0nW5zWkChsIPeM17MYuhhYWZcXtgr1ZgROif8WWXstN jYOSKuJX0a07snhSN1TtFxo0rHnmuodiqtnDYBefNYRnNqQPgHPykFHzPkYJbv07ZrZWrAtCv X43J1KpW2a94oYMvMQdyew7zy4i+56fb7CzBB0UKbzSIBdwvKhOCmCdpAO5YEwjPlBaj9x7xx cd6r3nATELY7vjdX Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1198 Lines: 30 On Thursday 05 November 2015 15:41:23 Moritz Fischer wrote: > +/* Pin names for the E31x usecase */ > +#define E31X_TX_BANDSEL_2 "DB_1" > +#define E31X_RX1B_BANDSEL_0 "DB_3" > +#define E31X_RX1B_BANDSEL_1 "DB_5" > +#define E31X_VCTXRX2_V2 "DB_7" > +#define E31X_TX_ENABLE1A "DB_9" > +#define E31X_TX_ENABLE2A "DB_11" > +#define E31X_TX_BANDSEL_0 "DB_12" Why not put the strings directly into the .dts files and change the lookup table in the driver accordingly: +static const struct pinctrl_pin_desc e3xx_pins[] = { + /* pin0 doesn't exist */ + PINCTRL_PIN(1, "TX_BANDSEL_2"), + PINCTRL_PIN(3, "RX1B_BANDSEL_0"), + PINCTRL_PIN(5, "RX1B_BANDSEL_1"), + PINCTRL_PIN(7, "VCTXRX2_V2"), That would save you the hassle of the three-way dependency between the dts file, the driver and the header when you want to change something going through three different maintainer trees. 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/