From: Peter De Schrijver (NVIDIA) Date: Wed, 21 Dec 2011 09:48:45 +0000 (+0100) Subject: ARM: 7240/1: Make ARCH_NR_GPIO a Kconfig variable X-Git-Tag: v3.3-rc1~176^2~2^2~5 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=44986ab056076e9dc9fb9f8b4729afef7fa72616;p=karo-tx-linux.git ARM: 7240/1: Make ARCH_NR_GPIO a Kconfig variable Change ARCH_NR_GPIO into a Kconfig variable as suggested by Russel King. This makes ARCH_NR_GPIO single zImage friendly. The default value for tegra is defined as well. Signed-off-by: Peter De Schrijver Signed-off-by: Russell King --- diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index e063d34ac7b9..003b7d00dd60 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1565,6 +1565,15 @@ config LOCAL_TIMERS accounting to be spread across the timer interval, preventing a "thundering herd" at every timer tick. +config ARCH_NR_GPIO + int + default 1024 if ARCH_TEGRA + default 0 + help + Maximum number of GPIOs in the system. + + If unsure, leave the default value. + source kernel/Kconfig.preempt config HZ diff --git a/arch/arm/include/asm/gpio.h b/arch/arm/include/asm/gpio.h index 11ad0bfbb0ad..7151753b0989 100644 --- a/arch/arm/include/asm/gpio.h +++ b/arch/arm/include/asm/gpio.h @@ -1,6 +1,10 @@ #ifndef _ARCH_ARM_GPIO_H #define _ARCH_ARM_GPIO_H +#if CONFIG_ARCH_NR_GPIO > 0 +#define ARCH_NR_GPIO CONFIG_ARCH_NR_GPIO +#endif + /* not all ARM platforms necessarily support this API ... */ #include