diff options
author | Andrew Victor <andrew@sanpeople.com> | 2007-05-14 09:30:15 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2007-07-12 06:12:34 -0400 |
commit | 8a87a996eae3d25b0670a243f4829ea4aa9eb63d (patch) | |
tree | d9be23b6bc2b061c57e066848059fda3e09f8d01 /include/asm-arm/arch-ks8695 | |
parent | 7dcca30a32aadb0520417521b0c44f42d09fe05c (diff) |
[ARM] 4377/1: KS8695: GPIO driver
Driver to control the GPIO pins on the KS8695 processor.
The driver natively supports the Generic GPIO interface.
Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include/asm-arm/arch-ks8695')
-rw-r--r-- | include/asm-arm/arch-ks8695/gpio.h | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/include/asm-arm/arch-ks8695/gpio.h b/include/asm-arm/arch-ks8695/gpio.h new file mode 100644 index 000000000000..65ceea28607b --- /dev/null +++ b/include/asm-arm/arch-ks8695/gpio.h | |||
@@ -0,0 +1,79 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-ks8695/gpio.h | ||
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 | |||
14 | #define KS8695_GPIO_0 0 | ||
15 | #define KS8695_GPIO_1 1 | ||
16 | #define KS8695_GPIO_2 2 | ||
17 | #define KS8695_GPIO_3 3 | ||
18 | #define KS8695_GPIO_4 4 | ||
19 | #define KS8695_GPIO_5 5 | ||
20 | #define KS8695_GPIO_6 6 | ||
21 | #define KS8695_GPIO_7 7 | ||
22 | #define KS8695_GPIO_8 8 | ||
23 | #define KS8695_GPIO_9 9 | ||
24 | #define KS8695_GPIO_10 10 | ||
25 | #define KS8695_GPIO_11 11 | ||
26 | #define KS8695_GPIO_12 12 | ||
27 | #define KS8695_GPIO_13 13 | ||
28 | #define KS8695_GPIO_14 14 | ||
29 | #define KS8695_GPIO_15 15 | ||
30 | |||
31 | |||
32 | /* | ||
33 | * Configure GPIO pin as external interrupt source. | ||
34 | */ | ||
35 | int __init_or_module ks8695_gpio_interrupt(unsigned int pin, unsigned int type); | ||
36 | |||
37 | /* | ||
38 | * Configure the GPIO line as an input. | ||
39 | */ | ||
40 | int __init_or_module gpio_direction_input(unsigned int pin); | ||
41 | |||
42 | /* | ||
43 | * Configure the GPIO line as an output, with default state. | ||
44 | */ | ||
45 | int __init_or_module gpio_direction_output(unsigned int pin, unsigned int state); | ||
46 | |||
47 | /* | ||
48 | * Set the state of an output GPIO line. | ||
49 | */ | ||
50 | void gpio_set_value(unsigned int pin, unsigned int state); | ||
51 | |||
52 | /* | ||
53 | * Read the state of a GPIO line. | ||
54 | */ | ||
55 | int gpio_get_value(unsigned int pin); | ||
56 | |||
57 | /* | ||
58 | * Map GPIO line to IRQ number. | ||
59 | */ | ||
60 | int gpio_to_irq(unsigned int pin); | ||
61 | |||
62 | /* | ||
63 | * Map IRQ number to GPIO line. | ||
64 | */ | ||
65 | int irq_to_gpio(unsigned int irq); | ||
66 | |||
67 | |||
68 | #include <asm-generic/gpio.h> | ||
69 | |||
70 | static inline int gpio_request(unsigned int pin, const char *label) | ||
71 | { | ||
72 | return 0; | ||
73 | } | ||
74 | |||
75 | static inline void gpio_free(unsigned int pin) | ||
76 | { | ||
77 | } | ||
78 | |||
79 | #endif | ||