diff options
author | Paulius Zaleckas <paulius.zaleckas@teltonika.lt> | 2009-03-26 04:06:27 -0400 |
---|---|---|
committer | Paulius Zaleckas <paulius.zaleckas@teltonika.lt> | 2009-03-26 04:06:27 -0400 |
commit | 1df621ae2f3b03d557d962a7afec2b1d04558986 (patch) | |
tree | 3de532bd034f01a73d4c04e297afa69835886708 /arch/arm/mach-gemini/include/mach | |
parent | 881a95f976e687307b41ba3c767561f533485c7e (diff) |
Gemini: gpiolib based GPIO support v2
v2:
- update copyrights
Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
Diffstat (limited to 'arch/arm/mach-gemini/include/mach')
-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 @@ | |||
1 | /* | ||
2 | * Gemini gpiolib specific defines | ||
3 | * | ||
4 | * Copyright (C) 2008-2009 Paulius Zaleckas <paulius.zaleckas@teltonika.lt> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | */ | ||
11 | |||
12 | #ifndef __MACH_GPIO_H__ | ||
13 | #define __MACH_GPIO_H__ | ||
14 | |||
15 | #include <mach/irqs.h> | ||
16 | #include <asm-generic/gpio.h> | ||
17 | |||
18 | #define gpio_get_value __gpio_get_value | ||
19 | #define gpio_set_value __gpio_set_value | ||
20 | #define gpio_cansleep __gpio_cansleep | ||
21 | |||
22 | #define gpio_to_irq(x) ((x) + GPIO_IRQ_BASE) | ||
23 | #define irq_to_gpio(x) ((x) - GPIO_IRQ_BASE) | ||
24 | |||
25 | #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 @@ | |||
43 | 43 | ||
44 | #define NORMAL_IRQ_NUM 32 | 44 | #define NORMAL_IRQ_NUM 32 |
45 | 45 | ||
46 | #define GPIO_IRQ_BASE NORMAL_IRQ_NUM | ||
47 | #define GPIO_IRQ_NUM (3 * 32) | ||
48 | |||
46 | #define ARCH_TIMER_IRQ IRQ_TIMER2 | 49 | #define ARCH_TIMER_IRQ IRQ_TIMER2 |
47 | 50 | ||
48 | #define NR_IRQS NORMAL_IRQ_NUM | 51 | #define NR_IRQS (NORMAL_IRQ_NUM + GPIO_IRQ_NUM) |
49 | 52 | ||
50 | #endif /* __MACH_IRQS_H__ */ | 53 | #endif /* __MACH_IRQS_H__ */ |