History

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.

Arnd Bergmann committed 10 years ago

Commit aa6aedb1 parent d7f77641 file · +4 −0Browse files

Unified · Split

include/asm-generic/gpio.h+4−0
@@ -26,8 +26,12 @@ · 25 unmodified lines
26 */26 */
27 27
28#ifndef ARCH_NR_GPIOS28#ifndef ARCH_NR_GPIOS
29#if defined(CONFIG_ARCH_NR_GPIO) && CONFIG_ARCH_NR_GPIO > 0
30#define ARCH_NR_GPIOS CONFIG_ARCH_NR_GPIO
31#else
29#define ARCH_NR_GPIOS 51232#define ARCH_NR_GPIOS 512
30#endif33#endif
34#endif
31 35
32/*36/*
33 * "valid" GPIO numbers are nonnegative and may be passed to37 * "valid" GPIO numbers are nonnegative and may be passed to

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t