mirror of https://github.com/OpenIPC/firmware.git
34 lines
928 B
Diff
34 lines
928 B
Diff
--- linux-4.9.37/include/linux/i2c.h 2017-07-12 16:42:41.000000000 +0300
|
|
+++ linux-4.9.y/include/linux/i2c.h 2021-06-07 13:01:34.000000000 +0300
|
|
@@ -68,6 +68,20 @@
|
|
*/
|
|
extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
|
|
int num);
|
|
+
|
|
+#ifdef CONFIG_ARCH_GOKE
|
|
+
|
|
+extern int gk_i2c_master_send(const struct i2c_client *client, const char *buf,
|
|
+ int count);
|
|
+
|
|
+extern int gk_i2c_master_recv(const struct i2c_client *client, char *buf,
|
|
+ int count);
|
|
+
|
|
+extern int gk_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
|
|
+ int num);
|
|
+
|
|
+#endif
|
|
+
|
|
/* Unlocked flavor */
|
|
extern int __i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
|
|
int num);
|
|
@@ -553,6 +567,9 @@
|
|
const struct i2c_lock_operations *lock_ops;
|
|
struct rt_mutex bus_lock;
|
|
struct rt_mutex mux_lock;
|
|
+#ifdef CONFIG_ARCH_GOKE
|
|
+ spinlock_t spinlock;
|
|
+#endif
|
|
|
|
int timeout; /* in jiffies */
|
|
int retries;
|