aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-sa1100/generic.c
diff options
context:
space:
mode:
authorDmitry Baryshkov <dbaryshkov@gmail.com>2008-04-10 08:31:47 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-04-10 10:31:37 -0400
commit45528e38173e7d8c03821850e8fd1ddbf16f2b3d (patch)
tree96ed1a1e340bb28e47d8b4b9e1de4b42e0d12bd6 /arch/arm/mach-sa1100/generic.c
parentc353faa4b2abd8d5142640b880532c97a0807460 (diff)
[ARM] 4961/1: gpiolib support for SA-1100 architecture
This adds gpiolib support for the SA-1100 arch: - Move all GPIO API functions from generic.c into gpio.c - Convert all gpio functions into gpiolib callbacks. Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-sa1100/generic.c')
-rw-r--r--arch/arm/mach-sa1100/generic.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c
index 5c84c604ed86..0c2fa1c4fb4c 100644
--- a/arch/arm/mach-sa1100/generic.c
+++ b/arch/arm/mach-sa1100/generic.c
@@ -139,37 +139,6 @@ unsigned long long sched_clock(void)
139 return v; 139 return v;
140} 140}
141 141
142int gpio_direction_input(unsigned gpio)
143{
144 unsigned long flags;
145
146 if (gpio > GPIO_MAX)
147 return -EINVAL;
148
149 local_irq_save(flags);
150 GPDR &= ~GPIO_GPIO(gpio);
151 local_irq_restore(flags);
152 return 0;
153}
154
155EXPORT_SYMBOL(gpio_direction_input);
156
157int gpio_direction_output(unsigned gpio, int value)
158{
159 unsigned long flags;
160
161 if (gpio > GPIO_MAX)
162 return -EINVAL;
163
164 local_irq_save(flags);
165 gpio_set_value(gpio, value);
166 GPDR |= GPIO_GPIO(gpio);
167 local_irq_restore(flags);
168 return 0;
169}
170
171EXPORT_SYMBOL(gpio_direction_output);
172
173/* 142/*
174 * Default power-off for SA1100 143 * Default power-off for SA1100
175 */ 144 */