aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-shmobile/include/mach/gpio.h
diff options
context:
space:
mode:
authorMagnus Damm <damm@opensource.se>2010-02-10 20:10:55 +0900
committerPaul Mundt <lethal@linux-sh.org>2010-02-12 14:10:47 +0900
commit7fdda6780aaa21c7a94e09975649649bb0f4a932 (patch)
treed9240403a18aa07ba9589e311d366e2e302c3956 /arch/arm/mach-shmobile/include/mach/gpio.h
parente4e430c611db75f58d3ca33869e182a530859426 (diff)
ARM: mach-shmobile: sh7367 and G3EVM pinmux support
Add support for the sh7367 pinmux using drivers/sh/pfc.c and select serial console pins and some LEDs on G3EVM. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/arm/mach-shmobile/include/mach/gpio.h')
-rw-r--r--arch/arm/mach-shmobile/include/mach/gpio.h49
1 files changed, 48 insertions, 1 deletions
diff --git a/arch/arm/mach-shmobile/include/mach/gpio.h b/arch/arm/mach-shmobile/include/mach/gpio.h
index 40a8c178f10..5bc6bd444d7 100644
--- a/arch/arm/mach-shmobile/include/mach/gpio.h
+++ b/arch/arm/mach-shmobile/include/mach/gpio.h
@@ -1 +1,48 @@
-/* empty */
+/*
+ * Generic GPIO API and pinmux table support
+ *
+ * Copyright (c) 2008 Magnus Damm
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ */
+#ifndef __ASM_ARCH_GPIO_H
+#define __ASM_ARCH_GPIO_H
+
+#include <linux/kernel.h>
+#include <linux/errno.h>
+
+#define ARCH_NR_GPIOS 1024
+#include <linux/sh_pfc.h>
+
+#ifdef CONFIG_GPIOLIB
+
+static inline int gpio_get_value(unsigned gpio)
+{
+ return __gpio_get_value(gpio);
+}
+
+static inline void gpio_set_value(unsigned gpio, int value)
+{
+ __gpio_set_value(gpio, value);
+}
+
+static inline int gpio_cansleep(unsigned gpio)
+{
+ return __gpio_cansleep(gpio);
+}
+
+static inline int gpio_to_irq(unsigned gpio)
+{
+ return -ENOSYS;
+}
+
+static inline int irq_to_gpio(unsigned int irq)
+{
+ return -EINVAL;
+}
+
+#endif /* CONFIG_GPIOLIB */
+
+#endif /* __ASM_ARCH_GPIO_H */