diff options
author | Arnd Bergmann <arnd@arndb.de> | 2016-02-16 16:40:38 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2016-02-19 00:22:54 +0100 |
commit | aa6aedb547209391db75b2e4fdbce6b442fd5891 (patch) | |
tree | 5bcf3f76c49492d828110606e5e7d7684e95287f | |
parent | d7f7764e02ad8c4c8919b2484212aca788001765 (diff) | |
download | op-kernel-dev-aa6aedb547209391db75b2e4fdbce6b442fd5891.zip op-kernel-dev-aa6aedb547209391db75b2e4fdbce6b442fd5891.tar.gz |
gpio: allow setting ARCH_NR_GPIOS from Kconfig
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>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r-- | include/asm-generic/gpio.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h index 40ec143..8ca627d 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 |