summaryrefslogtreecommitdiff
path: root/include/linux/i2c.h
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2012-06-29 07:47:19 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-06-29 19:03:25 -0300
commitb37d2a3a75cb0e72e18c29336cb2095b63dabfc8 (patch)
tree212e01d73f40881626b54ef4811de3a061788989 /include/linux/i2c.h
parenta99817ca60d206be3645d156f755cf065e949c58 (diff)
downloadlinux-exynos-b37d2a3a75cb0e72e18c29336cb2095b63dabfc8.tar.gz
linux-exynos-b37d2a3a75cb0e72e18c29336cb2095b63dabfc8.tar.bz2
linux-exynos-b37d2a3a75cb0e72e18c29336cb2095b63dabfc8.zip
[media] i2c: Export an unlocked flavor of i2c_transfer
Some drivers (in particular for TV cards) need exclusive access to their I2C buses for specific operations. Export an unlocked flavor of i2c_transfer to give them full control. The unlocked flavor has the following limitations: * Obviously, caller must hold the i2c adapter lock. * No debug messages are logged. We don't want to log messages while holding a rt_mutex. * No check is done on the existence of adap->algo->master_xfer. It is thus the caller's responsibility to ensure that the function is OK to call. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/linux/i2c.h')
-rw-r--r--include/linux/i2c.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 195d8b3d9cfb..a121c012309a 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -68,6 +68,9 @@ extern int i2c_master_recv(const struct i2c_client *client, char *buf,
*/
extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
int num);
+/* Unlocked flavor */
+extern int __i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
+ int num);
/* This is the very generalized SMBus access routine. You probably do not
want to use this, though; one of the functions below may be much easier,