summaryrefslogtreecommitdiffstats
path: root/target/linux/ar7-2.6/files/include/asm-generic
diff options
context:
space:
mode:
authorEugene Konev <ejka@imfi.kspu.ru>2007-03-18 09:40:51 +0000
committerEugene Konev <ejka@imfi.kspu.ru>2007-03-18 09:40:51 +0000
commit6eb218b9c979ddb0f078c733bffacd92e1da8c01 (patch)
tree85f03f558603853b9adbdb608c7665c484b370df /target/linux/ar7-2.6/files/include/asm-generic
parent3dbd8ff32fd6f707a69810152fed225f33dd55a5 (diff)
downloadmaster-31e0f0ae-6eb218b9c979ddb0f078c733bffacd92e1da8c01.tar.gz
master-31e0f0ae-6eb218b9c979ddb0f078c733bffacd92e1da8c01.tar.bz2
master-31e0f0ae-6eb218b9c979ddb0f078c733bffacd92e1da8c01.zip
Add ar7-2.6 port (marked as broken for now).
SVN-Revision: 6600
Diffstat (limited to 'target/linux/ar7-2.6/files/include/asm-generic')
-rw-r--r--target/linux/ar7-2.6/files/include/asm-generic/gpio.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/target/linux/ar7-2.6/files/include/asm-generic/gpio.h b/target/linux/ar7-2.6/files/include/asm-generic/gpio.h
new file mode 100644
index 0000000000..2d0aab1d86
--- /dev/null
+++ b/target/linux/ar7-2.6/files/include/asm-generic/gpio.h
@@ -0,0 +1,25 @@
+#ifndef _ASM_GENERIC_GPIO_H
+#define _ASM_GENERIC_GPIO_H
+
+/* 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 /* _ASM_GENERIC_GPIO_H */