diff options
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-sa1100/generic.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c index e510295c2580..192a5a26cf2b 100644 --- a/arch/arm/mach-sa1100/generic.c +++ b/arch/arm/mach-sa1100/generic.c | |||
@@ -138,6 +138,36 @@ unsigned long long sched_clock(void) | |||
138 | return v; | 138 | return v; |
139 | } | 139 | } |
140 | 140 | ||
141 | int gpio_direction_input(unsigned gpio) | ||
142 | { | ||
143 | unsigned long flags; | ||
144 | |||
145 | if (gpio > GPIO_MAX) | ||
146 | return -EINVAL; | ||
147 | |||
148 | local_irq_save(flags); | ||
149 | GPDR &= ~GPIO_GPIO(gpio); | ||
150 | local_irq_restore(flags); | ||
151 | return 0; | ||
152 | } | ||
153 | |||
154 | EXPORT_SYMBOL(gpio_direction_input); | ||
155 | |||
156 | int gpio_direction_output(unsigned gpio) | ||
157 | { | ||
158 | unsigned long flags; | ||
159 | |||
160 | if (gpio > GPIO_MAX) | ||
161 | return -EINVAL; | ||
162 | |||
163 | local_irq_save(flags); | ||
164 | GPDR |= GPIO_GPIO(gpio); | ||
165 | local_irq_restore(flags); | ||
166 | return 0; | ||
167 | } | ||
168 | |||
169 | EXPORT_SYMBOL(gpio_direction_output); | ||
170 | |||
141 | /* | 171 | /* |
142 | * Default power-off for SA1100 | 172 | * Default power-off for SA1100 |
143 | */ | 173 | */ |