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


Groups > linux.kernel > #1335554 > unrolled thread

[PATCH v2 5/5] gpio: allow setting ARCH_NR_GPIOS from Kconfig

Started byArnd Bergmann <arnd@arndb.de>
First post2016-02-16 16:50 +0100
Last post2016-02-16 16:50 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v2 5/5] gpio: allow setting ARCH_NR_GPIOS from Kconfig Arnd Bergmann <arnd@arndb.de> - 2016-02-16 16:50 +0100

#1335554 — [PATCH v2 5/5] gpio: allow setting ARCH_NR_GPIOS from Kconfig

FromArnd Bergmann <arnd@arndb.de>
Date2016-02-16 16:50 +0100
Subject[PATCH v2 5/5] gpio: allow setting ARCH_NR_GPIOS from Kconfig
Message-ID<r2Q30-1iJ-9@gated-at.bofh.it>
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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web