* [PATCH v2 5/5] gpio: allow setting ARCH_NR_GPIOS from Kconfig
[not found] ` <1455637261-2920972-1-git-send-email-arnd@arndb.de>
@ 2016-02-16 15:40 ` Arnd Bergmann
2016-02-16 15:40 ` Arnd Bergmann
2016-02-18 23:23 ` Linus Walleij
0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2016-02-16 15:40 UTC (permalink / raw)
To: Linus Walleij
Cc: linux-arm-kernel, Arnd Bergmann, Russell King, Bjorn Helgaas,
Alexandre Courbot, linux-gpio, linux-kernel, Lars-Peter Clausen,
Ralf Baechle, linux-mips, linux-arch
The ARM version of asm/gpio.h basically just contains the same definitions
as the gpiolib version, with the exception of ARCH_NR_GPIOS.
This adds the option for overriding the constant through Kconfig to
the architecture-independent header, so we can remove the ARM specific
file later.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
include/asm-generic/gpio.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
index 40ec1433f05d..8ca627dcea11 100644
--- a/include/asm-generic/gpio.h
+++ b/include/asm-generic/gpio.h
@@ -26,8 +26,12 @@
*/
#ifndef ARCH_NR_GPIOS
+#if defined(CONFIG_ARCH_NR_GPIO) && CONFIG_ARCH_NR_GPIO > 0
+#define ARCH_NR_GPIOS CONFIG_ARCH_NR_GPIO
+#else
#define ARCH_NR_GPIOS 512
#endif
+#endif
/*
* "valid" GPIO numbers are nonnegative and may be passed to
--
2.7.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH v2 5/5] gpio: allow setting ARCH_NR_GPIOS from Kconfig
2016-02-16 15:40 ` [PATCH v2 5/5] gpio: allow setting ARCH_NR_GPIOS from Kconfig Arnd Bergmann
@ 2016-02-16 15:40 ` Arnd Bergmann
2016-02-18 23:23 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2016-02-16 15:40 UTC (permalink / raw)
To: Linus Walleij
Cc: linux-arm-kernel, Arnd Bergmann, Russell King, Bjorn Helgaas,
Alexandre Courbot, linux-gpio, linux-kernel, Lars-Peter Clausen,
Ralf Baechle, linux-mips, linux-arch
The ARM version of asm/gpio.h basically just contains the same definitions
as the gpiolib version, with the exception of ARCH_NR_GPIOS.
This adds the option for overriding the constant through Kconfig to
the architecture-independent header, so we can remove the ARM specific
file later.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
include/asm-generic/gpio.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
index 40ec1433f05d..8ca627dcea11 100644
--- a/include/asm-generic/gpio.h
+++ b/include/asm-generic/gpio.h
@@ -26,8 +26,12 @@
*/
#ifndef ARCH_NR_GPIOS
+#if defined(CONFIG_ARCH_NR_GPIO) && CONFIG_ARCH_NR_GPIO > 0
+#define ARCH_NR_GPIOS CONFIG_ARCH_NR_GPIO
+#else
#define ARCH_NR_GPIOS 512
#endif
+#endif
/*
* "valid" GPIO numbers are nonnegative and may be passed to
--
2.7.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2 5/5] gpio: allow setting ARCH_NR_GPIOS from Kconfig
2016-02-16 15:40 ` [PATCH v2 5/5] gpio: allow setting ARCH_NR_GPIOS from Kconfig Arnd Bergmann
2016-02-16 15:40 ` Arnd Bergmann
@ 2016-02-18 23:23 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2016-02-18 23:23 UTC (permalink / raw)
To: Arnd Bergmann
Cc: linux-arm-kernel@lists.infradead.org, Russell King, Bjorn Helgaas,
Alexandre Courbot, linux-gpio@vger.kernel.org,
linux-kernel@vger.kernel.org, Lars-Peter Clausen, Ralf Baechle,
Linux MIPS, linux-arch@vger.kernel.org
On Tue, Feb 16, 2016 at 4:40 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> The ARM version of asm/gpio.h basically just contains the same definitions
> as the gpiolib version, with the exception of ARCH_NR_GPIOS.
>
> This adds the option for overriding the constant through Kconfig to
> the architecture-independent header, so we can remove the ARM specific
> file later.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Patch applied.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-02-18 23:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <455637086-2794174-1-git-send-email-arnd@arndb.de>
[not found] ` <1455637261-2920972-1-git-send-email-arnd@arndb.de>
2016-02-16 15:40 ` [PATCH v2 5/5] gpio: allow setting ARCH_NR_GPIOS from Kconfig Arnd Bergmann
2016-02-16 15:40 ` Arnd Bergmann
2016-02-18 23:23 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox