[POWERPC] Reworking machine check handling and Fix 440/440A
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / include / asm-generic / gpio.h
blob2d0aab1d8611b756ec02e8f31378c7b6f3f5e828
1 #ifndef _ASM_GENERIC_GPIO_H
2 #define _ASM_GENERIC_GPIO_H
4 /* platforms that don't directly support access to GPIOs through I2C, SPI,
5 * or other blocking infrastructure can use these wrappers.
6 */
8 static inline int gpio_cansleep(unsigned gpio)
10 return 0;
13 static inline int gpio_get_value_cansleep(unsigned gpio)
15 might_sleep();
16 return gpio_get_value(gpio);
19 static inline void gpio_set_value_cansleep(unsigned gpio, int value)
21 might_sleep();
22 gpio_set_value(gpio, value);
25 #endif /* _ASM_GENERIC_GPIO_H */