aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-u300/include/mach/gpio.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-u300/include/mach/gpio.h')
-rw-r--r--arch/arm/mach-u300/include/mach/gpio.h47
1 files changed, 0 insertions, 47 deletions
diff --git a/arch/arm/mach-u300/include/mach/gpio.h b/arch/arm/mach-u300/include/mach/gpio.h
index 430a0544baff..e69de29bb2d1 100644
--- a/arch/arm/mach-u300/include/mach/gpio.h
+++ b/arch/arm/mach-u300/include/mach/gpio.h
@@ -1,47 +0,0 @@
1/*
2 *
3 * arch/arm/mach-u300/include/mach/gpio.h
4 *
5 *
6 * Copyright (C) 2007-2009 ST-Ericsson AB
7 * License terms: GNU General Public License (GPL) version 2
8 * GPIO block resgister definitions and inline macros for
9 * U300 GPIO COH 901 335 or COH 901 571/3
10 * Author: Linus Walleij <linus.walleij@stericsson.com>
11 */
12
13#ifndef __MACH_U300_GPIO_H
14#define __MACH_U300_GPIO_H
15
16#define __ARM_GPIOLIB_COMPLEX
17
18/* These can be found in arch/arm/mach-u300/gpio.c */
19extern int gpio_is_valid(int number);
20extern int gpio_request(unsigned gpio, const char *label);
21extern void gpio_free(unsigned gpio);
22extern int gpio_direction_input(unsigned gpio);
23extern int gpio_direction_output(unsigned gpio, int value);
24extern int gpio_register_callback(unsigned gpio,
25 int (*func)(void *arg),
26 void *);
27extern int gpio_unregister_callback(unsigned gpio);
28extern void enable_irq_on_gpio_pin(unsigned gpio, int edge);
29extern void disable_irq_on_gpio_pin(unsigned gpio);
30extern void gpio_pullup(unsigned gpio, int value);
31extern int gpio_get_value(unsigned gpio);
32extern void gpio_set_value(unsigned gpio, int value);
33
34#define gpio_get_value_cansleep gpio_get_value
35#define gpio_set_value_cansleep gpio_set_value
36
37/* translates a pin number to a port number */
38#define PIN_TO_PORT(val) (val >> 3)
39
40/* wrappers to sleep-enable the previous two functions */
41static inline unsigned gpio_to_irq(unsigned gpio)
42{
43 return PIN_TO_PORT(gpio) + IRQ_U300_GPIO_PORT0;
44}
45#define gpio_to_irq gpio_to_irq
46
47#endif /* __MACH_U300_GPIO_H */