Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1263851

Re: [RFC 3/3] ARM: e3xx: Add header file for pinctrl constants

From Arnd Bergmann <arnd@arndb.de>
Newsgroups linux.kernel
Subject Re: [RFC 3/3] ARM: e3xx: Add header file for pinctrl constants
Date 2015-11-06 10:00 +0100
Message-ID <qrL2i-2eY-17@gated-at.bofh.it> (permalink)
References <qrCs2-5az-5@gated-at.bofh.it> <qrCs2-5az-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC 3/3] ARM: e3xx: Add header file for pinctrl constants Moritz Fischer <moritz.fischer@ettus.com> - 2015-11-06 00:50 +0100
  Re: [RFC 3/3] ARM: e3xx: Add header file for pinctrl constants Arnd Bergmann <arnd@arndb.de> - 2015-11-06 10:00 +0100
    Re: [RFC 3/3] ARM: e3xx: Add header file for pinctrl constants Moritz Fischer <moritz.fischer@ettus.com> - 2015-11-06 17:10 +0100
      Re: [RFC 3/3] ARM: e3xx: Add header file for pinctrl constants Arnd Bergmann <arnd@arndb.de> - 2015-11-06 17:50 +0100
        Re: [RFC 3/3] ARM: e3xx: Add header file for pinctrl constants Moritz Fischer <moritz.fischer@ettus.com> - 2015-11-06 19:00 +0100
          Re: [RFC 3/3] ARM: e3xx: Add header file for pinctrl constants Arnd Bergmann <arnd@arndb.de> - 2015-11-06 21:30 +0100

csiph-web