Commit | Line | Data |
---|---|---|
8a87a996 | 1 | /* |
a09e64fb | 2 | * arch/arm/mach-ks8695/include/mach/gpio.h |
8a87a996 AV |
3 | * |
4 | * Copyright (C) 2006 Andrew Victor | |
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 version 2 as | |
8 | * published by the Free Software Foundation. | |
9 | */ | |
10 | ||
11 | #ifndef __ASM_ARCH_GPIO_H_ | |
12 | #define __ASM_ARCH_GPIO_H_ | |
13 | ||
9c656850 UKK |
14 | #include <linux/kernel.h> |
15 | ||
8a87a996 AV |
16 | #define KS8695_GPIO_0 0 |
17 | #define KS8695_GPIO_1 1 | |
18 | #define KS8695_GPIO_2 2 | |
19 | #define KS8695_GPIO_3 3 | |
20 | #define KS8695_GPIO_4 4 | |
21 | #define KS8695_GPIO_5 5 | |
22 | #define KS8695_GPIO_6 6 | |
23 | #define KS8695_GPIO_7 7 | |
24 | #define KS8695_GPIO_8 8 | |
25 | #define KS8695_GPIO_9 9 | |
26 | #define KS8695_GPIO_10 10 | |
27 | #define KS8695_GPIO_11 11 | |
28 | #define KS8695_GPIO_12 12 | |
29 | #define KS8695_GPIO_13 13 | |
30 | #define KS8695_GPIO_14 14 | |
31 | #define KS8695_GPIO_15 15 | |
32 | ||
8a87a996 AV |
33 | /* |
34 | * Configure GPIO pin as external interrupt source. | |
35 | */ | |
72880ad8 | 36 | extern int ks8695_gpio_interrupt(unsigned int pin, unsigned int type); |
8a87a996 | 37 | |
8a87a996 AV |
38 | /* |
39 | * Map IRQ number to GPIO line. | |
40 | */ | |
72880ad8 | 41 | extern int irq_to_gpio(unsigned int irq); |
8a87a996 AV |
42 | |
43 | #include <asm-generic/gpio.h> | |
44 | ||
72880ad8 DS |
45 | /* If it turns out that we need to optimise GPIO access for the |
46 | * Micrel's GPIOs, then these can be changed to check their argument | |
47 | * directly as static inlines. However for now it's probably not | |
48 | * worthwhile. | |
49 | */ | |
50 | #define gpio_get_value __gpio_get_value | |
51 | #define gpio_set_value __gpio_set_value | |
7ef71320 | 52 | #define gpio_to_irq __gpio_to_irq |
8a87a996 | 53 | |
72880ad8 DS |
54 | /* Register the GPIOs */ |
55 | extern void ks8695_register_gpios(void); | |
8a87a996 AV |
56 | |
57 | #endif |