diff options
Diffstat (limited to 'arch/blackfin/include/asm/gpio.h')
-rw-r--r-- | arch/blackfin/include/asm/gpio.h | 111 |
1 files changed, 58 insertions, 53 deletions
diff --git a/arch/blackfin/include/asm/gpio.h b/arch/blackfin/include/asm/gpio.h index 01b19d0cf509..1ef8417f5d27 100644 --- a/arch/blackfin/include/asm/gpio.h +++ b/arch/blackfin/include/asm/gpio.h | |||
@@ -7,63 +7,63 @@ | |||
7 | #ifndef __ARCH_BLACKFIN_GPIO_H__ | 7 | #ifndef __ARCH_BLACKFIN_GPIO_H__ |
8 | #define __ARCH_BLACKFIN_GPIO_H__ | 8 | #define __ARCH_BLACKFIN_GPIO_H__ |
9 | 9 | ||
10 | #define gpio_bank(x) ((x) >> 4) | 10 | #define gpio_bank(x) ((x) >> 4) |
11 | #define gpio_bit(x) (1<<((x) & 0xF)) | 11 | #define gpio_bit(x) (1<<((x) & 0xF)) |
12 | #define gpio_sub_n(x) ((x) & 0xF) | 12 | #define gpio_sub_n(x) ((x) & 0xF) |
13 | 13 | ||
14 | #define GPIO_BANKSIZE 16 | 14 | #define GPIO_BANKSIZE 16 |
15 | #define GPIO_BANK_NUM DIV_ROUND_UP(MAX_BLACKFIN_GPIOS, GPIO_BANKSIZE) | 15 | #define GPIO_BANK_NUM DIV_ROUND_UP(MAX_BLACKFIN_GPIOS, GPIO_BANKSIZE) |
16 | 16 | ||
17 | #include <mach/gpio.h> | 17 | #include <mach/gpio.h> |
18 | 18 | ||
19 | #define GPIO_0 0 | 19 | #define GPIO_0 0 |
20 | #define GPIO_1 1 | 20 | #define GPIO_1 1 |
21 | #define GPIO_2 2 | 21 | #define GPIO_2 2 |
22 | #define GPIO_3 3 | 22 | #define GPIO_3 3 |
23 | #define GPIO_4 4 | 23 | #define GPIO_4 4 |
24 | #define GPIO_5 5 | 24 | #define GPIO_5 5 |
25 | #define GPIO_6 6 | 25 | #define GPIO_6 6 |
26 | #define GPIO_7 7 | 26 | #define GPIO_7 7 |
27 | #define GPIO_8 8 | 27 | #define GPIO_8 8 |
28 | #define GPIO_9 9 | 28 | #define GPIO_9 9 |
29 | #define GPIO_10 10 | 29 | #define GPIO_10 10 |
30 | #define GPIO_11 11 | 30 | #define GPIO_11 11 |
31 | #define GPIO_12 12 | 31 | #define GPIO_12 12 |
32 | #define GPIO_13 13 | 32 | #define GPIO_13 13 |
33 | #define GPIO_14 14 | 33 | #define GPIO_14 14 |
34 | #define GPIO_15 15 | 34 | #define GPIO_15 15 |
35 | #define GPIO_16 16 | 35 | #define GPIO_16 16 |
36 | #define GPIO_17 17 | 36 | #define GPIO_17 17 |
37 | #define GPIO_18 18 | 37 | #define GPIO_18 18 |
38 | #define GPIO_19 19 | 38 | #define GPIO_19 19 |
39 | #define GPIO_20 20 | 39 | #define GPIO_20 20 |
40 | #define GPIO_21 21 | 40 | #define GPIO_21 21 |
41 | #define GPIO_22 22 | 41 | #define GPIO_22 22 |
42 | #define GPIO_23 23 | 42 | #define GPIO_23 23 |
43 | #define GPIO_24 24 | 43 | #define GPIO_24 24 |
44 | #define GPIO_25 25 | 44 | #define GPIO_25 25 |
45 | #define GPIO_26 26 | 45 | #define GPIO_26 26 |
46 | #define GPIO_27 27 | 46 | #define GPIO_27 27 |
47 | #define GPIO_28 28 | 47 | #define GPIO_28 28 |
48 | #define GPIO_29 29 | 48 | #define GPIO_29 29 |
49 | #define GPIO_30 30 | 49 | #define GPIO_30 30 |
50 | #define GPIO_31 31 | 50 | #define GPIO_31 31 |
51 | #define GPIO_32 32 | 51 | #define GPIO_32 32 |
52 | #define GPIO_33 33 | 52 | #define GPIO_33 33 |
53 | #define GPIO_34 34 | 53 | #define GPIO_34 34 |
54 | #define GPIO_35 35 | 54 | #define GPIO_35 35 |
55 | #define GPIO_36 36 | 55 | #define GPIO_36 36 |
56 | #define GPIO_37 37 | 56 | #define GPIO_37 37 |
57 | #define GPIO_38 38 | 57 | #define GPIO_38 38 |
58 | #define GPIO_39 39 | 58 | #define GPIO_39 39 |
59 | #define GPIO_40 40 | 59 | #define GPIO_40 40 |
60 | #define GPIO_41 41 | 60 | #define GPIO_41 41 |
61 | #define GPIO_42 42 | 61 | #define GPIO_42 42 |
62 | #define GPIO_43 43 | 62 | #define GPIO_43 43 |
63 | #define GPIO_44 44 | 63 | #define GPIO_44 44 |
64 | #define GPIO_45 45 | 64 | #define GPIO_45 45 |
65 | #define GPIO_46 46 | 65 | #define GPIO_46 46 |
66 | #define GPIO_47 47 | 66 | #define GPIO_47 47 |
67 | 67 | ||
68 | #define PERIPHERAL_USAGE 1 | 68 | #define PERIPHERAL_USAGE 1 |
69 | #define GPIO_USAGE 0 | 69 | #define GPIO_USAGE 0 |
@@ -279,6 +279,11 @@ static inline int gpio_direction_output(unsigned gpio, int value) | |||
279 | return bfin_gpio_direction_output(gpio, value); | 279 | return bfin_gpio_direction_output(gpio, value); |
280 | } | 280 | } |
281 | 281 | ||
282 | static inline int gpio_set_debounce(unsigned gpio, unsigned debounce) | ||
283 | { | ||
284 | return -EINVAL; | ||
285 | } | ||
286 | |||
282 | static inline int gpio_get_value(unsigned gpio) | 287 | static inline int gpio_get_value(unsigned gpio) |
283 | { | 288 | { |
284 | return bfin_gpio_get_value(gpio); | 289 | return bfin_gpio_get_value(gpio); |