summaryrefslogtreecommitdiff
path: root/arch/arm/mach-wmt/include/mach/wmt-i2c-bus.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-i2c-bus.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-i2c-bus.h')
-rwxr-xr-xarch/arm/mach-wmt/include/mach/wmt-i2c-bus.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/arch/arm/mach-wmt/include/mach/wmt-i2c-bus.h b/arch/arm/mach-wmt/include/mach/wmt-i2c-bus.h
new file mode 100755
index 00000000..9a67b22e
--- /dev/null
+++ b/arch/arm/mach-wmt/include/mach/wmt-i2c-bus.h
@@ -0,0 +1,39 @@
+#include <mach/hardware.h>
+#include <linux/i2c.h>
+
+struct i2c_slave_dev {
+ unsigned short addr;
+ char * dev_name;
+ void (*callback)(void *data);
+ struct i2c_msg *msg;
+};
+
+struct wmt_i2cbusfifo {
+ struct i2c_msg *msg;
+ int msg_num;
+ struct list_head busfifohead;
+ int non_block;/*1:non-block, 0: block*/
+ int xfer_length;
+ int xfer_msgnum;
+ int restart;
+ void (*callback)(void *data);
+ void *data;
+};
+
+
+struct i2c_algo_wmt_data {
+ int (*write_msg)(unsigned int slave_addr, char *buf, unsigned int length , int restart, int last) ;
+ int (*read_msg)(unsigned int slave_addr, char *buf, unsigned int length , int restart, int last) ;
+ int (*send_request)(struct i2c_msg *msg, int msg_num, int non_block, void (*callbck)(void *data), void *data);
+#ifdef CONFIG_SND_SOC_VT1603
+ int (*vt1603_write_for_read)(unsigned int slave_addr, char *buf, unsigned int length , int restart, int last);
+#endif
+ int (*wait_bus_not_busy) (void);
+ void (*reset) (void);
+ void (*set_mode)(enum i2c_mode_e) ;
+ int udelay;
+ int timeout;
+};
+
+extern int wmt_i2c_transfer(struct i2c_msg* msgs, int msg_num, int bus_id, void (*callback)(void *data), void *data);
+