quota: move function-macros from quota.h to quotaops.h
[linux-2.6/mini2440.git] / include / asm-x86 / gpio.h
blob116e9147fe66473c0412685480e565a8a1fd8b76
1 /*
2 * Generic GPIO API implementation for x86.
4 * Derived from the generic GPIO API for powerpc:
6 * Copyright (c) 2007-2008 MontaVista Software, Inc.
8 * Author: Anton Vorontsov <avorontsov@ru.mvista.com>
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
16 #ifndef _ASM_I386_GPIO_H
17 #define _ASM_I386_GPIO_H
19 #ifdef CONFIG_X86_RDC321X
20 #include <gpio.h>
21 #else /* CONFIG_X86_RDC321X */
23 #include <asm-generic/gpio.h>
25 #ifdef CONFIG_GPIOLIB
28 * Just call gpiolib.
30 static inline int gpio_get_value(unsigned int gpio)
32 return __gpio_get_value(gpio);
35 static inline void gpio_set_value(unsigned int gpio, int value)
37 __gpio_set_value(gpio, value);
40 static inline int gpio_cansleep(unsigned int gpio)
42 return __gpio_cansleep(gpio);
46 * Not implemented, yet.
48 static inline int gpio_to_irq(unsigned int gpio)
50 return -ENOSYS;
53 static inline int irq_to_gpio(unsigned int irq)
55 return -EINVAL;
58 #endif /* CONFIG_GPIOLIB */
60 #endif /* CONFIG_X86_RDC321X */
62 #endif /* _ASM_I386_GPIO_H */