diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2005-06-24 15:54:35 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2005-06-24 15:54:35 -0400 |
commit | c4982887cacf2122bc256e901598b58caf4a34be (patch) | |
tree | 12f3ddeb179f6b6f4cc956b83c726ee9208e542a /include/asm-arm/arch-ixp2000/platform.h | |
parent | c6b56949de86694d837750a0a89c766b9871e81c (diff) |
[PATCH] ARM: 2744/1: ixp2000 gpio irq support
Patch from Lennert Buytenhek
This patch cleans up the ixp2000 gpio irq code and implements the
set_irq_type method for gpio irqs so that users can select for which
events (falling edge/rising edge/level low/level high) on the gpio
pin they want the corresponding gpio irq to be triggered.
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Deepak Saxena
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include/asm-arm/arch-ixp2000/platform.h')
-rw-r--r-- | include/asm-arm/arch-ixp2000/platform.h | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/include/asm-arm/arch-ixp2000/platform.h b/include/asm-arm/arch-ixp2000/platform.h index 901bba6d02b4..52ded516ea5c 100644 --- a/include/asm-arm/arch-ixp2000/platform.h +++ b/include/asm-arm/arch-ixp2000/platform.h | |||
@@ -138,30 +138,10 @@ struct ixp2000_flash_data { | |||
138 | unsigned long (*bank_setup)(unsigned long); | 138 | unsigned long (*bank_setup)(unsigned long); |
139 | }; | 139 | }; |
140 | 140 | ||
141 | /* | ||
142 | * GPIO helper functions | ||
143 | */ | ||
144 | #define GPIO_IN 0 | ||
145 | #define GPIO_OUT 1 | ||
146 | |||
147 | extern void gpio_line_config(int line, int style); | ||
148 | |||
149 | static inline int gpio_line_get(int line) | ||
150 | { | ||
151 | return (((*IXP2000_GPIO_PLR) >> line) & 1); | ||
152 | } | ||
153 | |||
154 | static inline void gpio_line_set(int line, int value) | ||
155 | { | ||
156 | if (value) | ||
157 | ixp2000_reg_write(IXP2000_GPIO_POSR, (1 << line)); | ||
158 | else | ||
159 | ixp2000_reg_write(IXP2000_GPIO_POCR, (1 << line)); | ||
160 | } | ||
161 | |||
162 | struct ixp2000_i2c_pins { | 141 | struct ixp2000_i2c_pins { |
163 | unsigned long sda_pin; | 142 | unsigned long sda_pin; |
164 | unsigned long scl_pin; | 143 | unsigned long scl_pin; |
165 | }; | 144 | }; |
166 | 145 | ||
146 | |||
167 | #endif /* !__ASSEMBLY__ */ | 147 | #endif /* !__ASSEMBLY__ */ |