Merge branch 'for-2.6.30' into for-2.6.31
[pandora-kernel.git] / arch / arm / plat-orion / include / plat / gpio.h
1 /*
2  * arch/arm/plat-orion/include/plat/gpio.h
3  *
4  * Marvell Orion SoC GPIO handling.
5  *
6  * This file is licensed under the terms of the GNU General Public
7  * License version 2.  This program is licensed "as is" without any
8  * warranty of any kind, whether express or implied.
9  */
10
11 #ifndef __PLAT_GPIO_H
12 #define __PLAT_GPIO_H
13
14 /*
15  * GENERIC_GPIO primitives.
16  */
17 int gpio_request(unsigned pin, const char *label);
18 void gpio_free(unsigned pin);
19 int gpio_direction_input(unsigned pin);
20 int gpio_direction_output(unsigned pin, int value);
21 int gpio_get_value(unsigned pin);
22 void gpio_set_value(unsigned pin, int value);
23
24 /*
25  * Orion-specific GPIO API extensions.
26  */
27 void orion_gpio_set_unused(unsigned pin);
28 void orion_gpio_set_blink(unsigned pin, int blink);
29
30 #define GPIO_BIDI_OK            (1 << 0)
31 #define GPIO_INPUT_OK           (1 << 1)
32 #define GPIO_OUTPUT_OK          (1 << 2)
33 void orion_gpio_set_valid(unsigned pin, int mode);
34
35 /*
36  * GPIO interrupt handling.
37  */
38 extern struct irq_chip orion_gpio_irq_chip;
39 void orion_gpio_irq_handler(int irqoff);
40
41
42 #endif