diff options
author | Jean Delvare <khali@linux-fr.org> | 2012-06-29 06:47:19 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-06-29 18:03:25 -0400 |
commit | b37d2a3a75cb0e72e18c29336cb2095b63dabfc8 (patch) | |
tree | 212e01d73f40881626b54ef4811de3a061788989 /include/linux/i2c.h | |
parent | a99817ca60d206be3645d156f755cf065e949c58 (diff) |
[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.h | 3 |
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, | |||
68 | */ | 68 | */ |
69 | extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs, | 69 | extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs, |
70 | int num); | 70 | int num); |
71 | /* Unlocked flavor */ | ||
72 | extern int __i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs, | ||
73 | int num); | ||
71 | 74 | ||
72 | /* This is the very generalized SMBus access routine. You probably do not | 75 | /* This is the very generalized SMBus access routine. You probably do not |
73 | want to use this, though; one of the functions below may be much easier, | 76 | want to use this, though; one of the functions below may be much easier, |