diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2013-12-26 12:50:40 +0530 |
---|---|---|
committer | Tom Cherry <tcherry@nvidia.com> | 2014-01-21 20:27:47 -0800 |
commit | 20f47114bb9df5b2d552559cf2cad0e9b3bcda7a (patch) | |
tree | ccb0aaa5668f58f28bdcfc82d39d8744ab0b1469 /arch/arm64 | |
parent | 0cf299e8e7f926551c1f98b4b7325ddfba8eb0fb (diff) |
arm64: add custom gpio header
Add custom gpio header to define the gpio specific
configuration.
Change-Id: I682f0359586a5c2149567c1d588703758c2370fa
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/349673
Reviewed-by: Suresh Mangipudi <smangipudi@nvidia.com>
Tested-by: Suresh Mangipudi <smangipudi@nvidia.com>
Diffstat (limited to 'arch/arm64')
-rw-r--r-- | arch/arm64/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm64/include/asm/gpio.h | 32 |
2 files changed, 33 insertions, 0 deletions
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 790fe1b3fe0a..f9fe633cc12a 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -1,6 +1,7 @@ config ARM64 def_bool y select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE + select ARCH_HAVE_CUSTOM_GPIO_H select ARCH_WANT_OPTIONAL_GPIOLIB select ARCH_WANT_COMPAT_IPC_PARSE_VERSION select ARCH_WANT_FRAME_POINTERS diff --git a/arch/arm64/include/asm/gpio.h b/arch/arm64/include/asm/gpio.h new file mode 100644 index 000000000000..477e0206e016 --- /dev/null +++ b/arch/arm64/include/asm/gpio.h @@ -0,0 +1,32 @@ +#ifndef _ARCH_ARM_GPIO_H +#define _ARCH_ARM_GPIO_H + +#if CONFIG_ARCH_NR_GPIO > 0 +#define ARCH_NR_GPIOS CONFIG_ARCH_NR_GPIO +#endif + +/* not all ARM platforms necessarily support this API ... */ +#ifdef CONFIG_NEED_MACH_GPIO_H +#include <mach/gpio.h> +#endif + +#ifndef __ARM_GPIOLIB_COMPLEX +/* Note: this may rely upon the value of ARCH_NR_GPIOS set in mach/gpio.h */ +#include <asm-generic/gpio.h> + +/* The trivial gpiolib dispatchers */ +#define gpio_get_value __gpio_get_value +#define gpio_set_value __gpio_set_value +#define gpio_cansleep __gpio_cansleep +#endif + +/* + * Provide a default gpio_to_irq() which should satisfy every case. + * However, some platforms want to do this differently, so allow them + * to override it. + */ +#ifndef gpio_to_irq +#define gpio_to_irq __gpio_to_irq +#endif + +#endif /* _ARCH_ARM_GPIO_H */ |