mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-04-21 12:27:27 +03:00
[atheros] use generic cansleep wrappers for GPIO
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12567 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
@@ -113,24 +113,6 @@ static inline int irq_to_gpio(unsigned irq) {
|
|||||||
return (irq - (AR531X_GPIO_IRQ(0)));
|
return (irq - (AR531X_GPIO_IRQ(0)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* #include <asm-generic/gpio.h> */ /* cansleep wrappers */
|
#include <asm-generic/gpio.h> /* cansleep wrappers */
|
||||||
/* platforms that don't directly support access to GPIOs through I2C, SPI,
|
|
||||||
* or other blocking infrastructure can use these wrappers.
|
|
||||||
*/
|
|
||||||
|
|
||||||
static inline int gpio_cansleep(unsigned gpio) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline int gpio_get_value_cansleep(unsigned gpio) {
|
|
||||||
might_sleep();
|
|
||||||
return gpio_get_value(gpio);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void gpio_set_value_cansleep(unsigned gpio, int value) {
|
|
||||||
might_sleep();
|
|
||||||
gpio_set_value(gpio, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user