kernel: scheduling fix for ARM
[minix.git] / drivers / gpio / gpio.h
blob5984ca8a360442ee5f5dff67d55348167abc140f
1 #ifndef __INCLUDE_GPIO_H__
2 #define __INCLUDE_GPIO_H__
4 struct gpio
6 int nr; /* GPIO number */
7 int mode; /* GPIO mode (input=0/output=1) */
8 void *data; /* data pointer (not used in the omap driver) */
9 };
11 #define GPIO_MODE_INPUT 0
12 #define GPIO_MODE_OUTPUT 1
14 struct gpio_driver
16 /* request access to a gpio */
17 int (*claim) (char *owner, int nr, struct gpio ** gpio);
19 /* Configure the GPIO for a certain purpose */
20 int (*pin_mode) (struct gpio * gpio, int mode);
22 /* Set the value for a GPIO */
23 int (*set) (struct gpio * gpio, int value);
25 /* Read the value of the GPIO */
26 int (*read) (struct gpio * gpio, int *value);
29 int omap_gpio_init(struct gpio_driver *gpio_driver);
30 #endif /* __INCLUDE_GPIO_H__ */