summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-u300/gpio.c
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@citi.umich.edu>2009-10-27 18:45:17 -0400
committerJ. Bruce Fields <bfields@citi.umich.edu>2009-10-27 18:45:17 -0400
commite343eb0d60f74547e0aeb5bd151105c2e6cfe588 (patch)
tree92586df0daf3298262a957640e5c86679c963f41 /arch/arm/mach-u300/gpio.c
parentddc04fd4d5163aee9ebdb38a56c365b602e2b7b7 (diff)
parent012abeea669ea49636cf952d13298bb68654146a (diff)
downloadblackbird-op-linux-e343eb0d60f74547e0aeb5bd151105c2e6cfe588.tar.gz
blackbird-op-linux-e343eb0d60f74547e0aeb5bd151105c2e6cfe588.zip
Merge commit 'v2.6.32-rc5' into for-2.6.33
Diffstat (limited to 'arch/arm/mach-u300/gpio.c')
-rw-r--r--arch/arm/mach-u300/gpio.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/mach-u300/gpio.c b/arch/arm/mach-u300/gpio.c
index 63c8f27fb15a..0b35826b7d1d 100644
--- a/arch/arm/mach-u300/gpio.c
+++ b/arch/arm/mach-u300/gpio.c
@@ -281,6 +281,16 @@ int gpio_unregister_callback(unsigned gpio)
}
EXPORT_SYMBOL(gpio_unregister_callback);
+/* Non-zero means valid */
+int gpio_is_valid(int number)
+{
+ if (number >= 0 &&
+ number < (U300_GPIO_NUM_PORTS * U300_GPIO_PINS_PER_PORT))
+ return 1;
+ return 0;
+}
+EXPORT_SYMBOL(gpio_is_valid);
+
int gpio_request(unsigned gpio, const char *label)
{
if (gpio_pin[gpio].users)
OpenPOWER on IntegriCloud