X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=ndk%2Fandroid-ndk-r4%2Flinux%2Fplatforms%2Fandroid-4%2Farch-arm%2Fusr%2Finclude%2Fasm%2Farch%2Fgpio.h;fp=ndk%2Fandroid-ndk-r4%2Flinux%2Fplatforms%2Fandroid-4%2Farch-arm%2Fusr%2Finclude%2Fasm%2Farch%2Fgpio.h;h=332246d7c0fd4a2486267c41f1b0f41b505d06f0;hb=72eddb87bfc38a2f6fae40566ec6380eb838489a;hp=0000000000000000000000000000000000000000;hpb=e19e12d257815bef7bfe4f3d81056a5b2464c464;p=android-x86%2Fprebuilt.git diff --git a/ndk/android-ndk-r4/linux/platforms/android-4/arch-arm/usr/include/asm/arch/gpio.h b/ndk/android-ndk-r4/linux/platforms/android-4/arch-arm/usr/include/asm/arch/gpio.h new file mode 100644 index 0000000..332246d --- /dev/null +++ b/ndk/android-ndk-r4/linux/platforms/android-4/arch-arm/usr/include/asm/arch/gpio.h @@ -0,0 +1,49 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + **************************************************************************** + ****************************************************************************/ +#ifndef __ASM_ARCH_OMAP_GPIO_H +#define __ASM_ARCH_OMAP_GPIO_H + +#include +#include +#include + +#define OMAP_MPUIO_BASE (void __iomem *)0xfffb5000 + +#define OMAP_MPUIO_INPUT_LATCH 0x00 +#define OMAP_MPUIO_OUTPUT 0x04 +#define OMAP_MPUIO_IO_CNTL 0x08 +#define OMAP_MPUIO_KBR_LATCH 0x10 +#define OMAP_MPUIO_KBC 0x14 +#define OMAP_MPUIO_GPIO_EVENT_MODE 0x18 +#define OMAP_MPUIO_GPIO_INT_EDGE 0x1c +#define OMAP_MPUIO_KBD_INT 0x20 +#define OMAP_MPUIO_GPIO_INT 0x24 +#define OMAP_MPUIO_KBD_MASKIT 0x28 +#define OMAP_MPUIO_GPIO_MASKIT 0x2c +#define OMAP_MPUIO_GPIO_DEBOUNCING 0x30 +#define OMAP_MPUIO_LATCH 0x34 + +#define OMAP_MPUIO(nr) (OMAP_MAX_GPIO_LINES + (nr)) +#define OMAP_GPIO_IS_MPUIO(nr) ((nr) >= OMAP_MAX_GPIO_LINES) + +#define OMAP_GPIO_IRQ(nr) (OMAP_GPIO_IS_MPUIO(nr) ? IH_MPUIO_BASE + ((nr) & 0x0f) : IH_GPIO_BASE + (nr)) + +struct omap_machine_gpio_bank { + int start; + int end; + + void (*set_gpio_direction)(int gpio, int is_input); + void (*set_gpio_dataout)(int gpio, int enable); + int (*get_gpio_datain)(int gpio); +}; + +#endif