diff options
Diffstat (limited to 'arch/arm/mach-gemini/include')
-rw-r--r-- | arch/arm/mach-gemini/include/mach/gpio.h | 25 | ||||
-rw-r--r-- | arch/arm/mach-gemini/include/mach/irqs.h | 5 |
2 files changed, 29 insertions, 1 deletions
diff --git a/arch/arm/mach-gemini/include/mach/gpio.h b/arch/arm/mach-gemini/include/mach/gpio.h new file mode 100644 index 000000000000..3bc2c70f2989 --- /dev/null +++ b/arch/arm/mach-gemini/include/mach/gpio.h @@ -0,0 +1,25 @@ +/* + * Gemini gpiolib specific defines + * + * Copyright (C) 2008-2009 Paulius Zaleckas <paulius.zaleckas@teltonika.lt> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + */ + +#ifndef __MACH_GPIO_H__ +#define __MACH_GPIO_H__ + +#include <mach/irqs.h> +#include <asm-generic/gpio.h> + +#define gpio_get_value __gpio_get_value +#define gpio_set_value __gpio_set_value +#define gpio_cansleep __gpio_cansleep + +#define gpio_to_irq(x) ((x) + GPIO_IRQ_BASE) +#define irq_to_gpio(x) ((x) - GPIO_IRQ_BASE) + +#endif /* __MACH_GPIO_H__ */ diff --git a/arch/arm/mach-gemini/include/mach/irqs.h b/arch/arm/mach-gemini/include/mach/irqs.h index c7728ac458f3..06bc47e77e8b 100644 --- a/arch/arm/mach-gemini/include/mach/irqs.h +++ b/arch/arm/mach-gemini/include/mach/irqs.h @@ -43,8 +43,11 @@ #define NORMAL_IRQ_NUM 32 +#define GPIO_IRQ_BASE NORMAL_IRQ_NUM +#define GPIO_IRQ_NUM (3 * 32) + #define ARCH_TIMER_IRQ IRQ_TIMER2 -#define NR_IRQS NORMAL_IRQ_NUM +#define NR_IRQS (NORMAL_IRQ_NUM + GPIO_IRQ_NUM) #endif /* __MACH_IRQS_H__ */ |