浏览代码

sh: gpio: Stub in dummy GPIO<->IRQ mapping routines.

IRQ modes are not presently supported, so stub in dummy definitions
for now (taken from linux/gpio.h).

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt 16 年之前
父节点
当前提交
5501093784
共有 1 个文件被更改,包括 15 次插入0 次删除
  1. 15 0
      arch/sh/include/asm/gpio.h

+ 15 - 0
arch/sh/include/asm/gpio.h

@@ -12,6 +12,8 @@
 #ifndef __ASM_SH_GPIO_H
 #ifndef __ASM_SH_GPIO_H
 #define __ASM_SH_GPIO_H
 #define __ASM_SH_GPIO_H
 
 
+#include <linux/errno.h>
+
 #if defined(CONFIG_CPU_SH3)
 #if defined(CONFIG_CPU_SH3)
 #include <cpu/gpio.h>
 #include <cpu/gpio.h>
 #endif
 #endif
@@ -100,6 +102,19 @@ int gpio_direction_output(unsigned gpio, int value);
 int gpio_get_value(unsigned gpio);
 int gpio_get_value(unsigned gpio);
 void gpio_set_value(unsigned gpio, int value);
 void gpio_set_value(unsigned gpio, int value);
 
 
+/* IRQ modes are unspported */
+static inline int gpio_to_irq(unsigned gpio)
+{
+	WARN_ON(1);
+	return -EINVAL;
+}
+
+static inline int irq_to_gpio(unsigned irq)
+{
+	WARN_ON(1);
+	return -EINVAL;
+}
+
 #include <asm-generic/gpio.h>
 #include <asm-generic/gpio.h>
 
 
 #endif /* __ASM_SH_GPIO_H */
 #endif /* __ASM_SH_GPIO_H */