summaryrefslogtreecommitdiff
path: root/arch/arm/mach-wmt/include/mach/wmt_iomux.h
diff options
context:
space:
mode:
authorSrikant Patnaik2015-01-11 12:28:04 +0530
committerSrikant Patnaik2015-01-11 12:28:04 +0530
commit871480933a1c28f8a9fed4c4d34d06c439a7a422 (patch)
tree8718f573808810c2a1e8cb8fb6ac469093ca2784 /arch/arm/mach-wmt/include/mach/wmt_iomux.h
parent9d40ac5867b9aefe0722bc1f110b965ff294d30d (diff)
downloadFOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.tar.gz
FOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.tar.bz2
FOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.zip
Moved, renamed, and deleted files
The original directory structure was scattered and unorganized. Changes are basically to make it look like kernel structure.
Diffstat (limited to 'arch/arm/mach-wmt/include/mach/wmt_iomux.h')
-rwxr-xr-xarch/arm/mach-wmt/include/mach/wmt_iomux.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/arch/arm/mach-wmt/include/mach/wmt_iomux.h b/arch/arm/mach-wmt/include/mach/wmt_iomux.h
new file mode 100755
index 00000000..fdb81566
--- /dev/null
+++ b/arch/arm/mach-wmt/include/mach/wmt_iomux.h
@@ -0,0 +1,45 @@
+
+#ifndef __MACH_WMT_IOMUX_H__
+#define __MACH_WMT_IOMUX_H__
+
+#include <linux/types.h>
+
+#undef WMT_PIN
+#define WMT_PIN(__gp, __bit, __irq, __name) __name,
+enum iomux_pins {
+ #include "iomux.h"
+};
+
+/* use gpiolib dispatchers */
+#define gpio_get_value __gpio_get_value
+#define gpio_set_value __gpio_set_value
+#define gpio_cansleep __gpio_cansleep
+
+enum wmt_gpio_pulltype {
+ WMT_GPIO_PULL_NONE = 0,
+ WMT_GPIO_PULL_UP,
+ WMT_GPIO_PULL_DOWN,
+};
+extern int wmt_gpio_setpull(unsigned int gpio, enum wmt_gpio_pulltype pull);
+extern int wmt_gpio_getpull(unsigned int gpio);
+extern const char *wmt_gpio_name(int gpio);
+
+/* below for gpio irq */
+
+extern void wmt_gpio_ack_irq(unsigned int gpio);
+extern void wmt_gpio_mask_irq(unsigned int gpio);
+extern void wmt_gpio_unmask_irq(unsigned int gpio);
+extern int is_gpio_irqenable(u32 irqindex);
+extern int gpio_irqstatus(unsigned int gpio);
+/*
+ * current support type: (in <linux/irq.h>)
+ * IRQ_TYPE_EDGE_RISING
+ * IRQ_TYPE_EDGE_FALLING
+ * IRQ_TYPE_EDGE_BOTH
+ * IRQ_TYPE_LEVEL_LOW
+ * IRQ_TYPE_LEVEL_HIGH
+ */
+extern int wmt_gpio_set_irq_type(unsigned int gpio, u32 type);
+
+#endif /* #ifndef __MACH_WMT_IOMUX_H__ */
+