aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/i2c/writing-clients
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2010-08-04 08:05:07 -0400
committerMichal Marek <mmarek@suse.cz>2010-08-04 08:05:07 -0400
commit7a996d3ab150bb0e1b71fa182f70199a703efdd1 (patch)
tree96a36947d90c9b96580899abd38cb3b70cd9d40b /Documentation/i2c/writing-clients
parent7cf3d73b4360e91b14326632ab1aeda4cb26308d (diff)
parent9fe6206f400646a2322096b56c59891d530e8d51 (diff)
Merge commit 'v2.6.35' into kbuild/kconfig
Conflicts: scripts/kconfig/Makefile
Diffstat (limited to 'Documentation/i2c/writing-clients')
-rw-r--r--Documentation/i2c/writing-clients10
1 files changed, 8 insertions, 2 deletions
diff --git a/Documentation/i2c/writing-clients b/Documentation/i2c/writing-clients
index 0a74603eb671..5ebf5af1d716 100644
--- a/Documentation/i2c/writing-clients
+++ b/Documentation/i2c/writing-clients
@@ -74,6 +74,11 @@ structure at all. You should use this to keep device-specific data.
74 /* retrieve the value */ 74 /* retrieve the value */
75 void *i2c_get_clientdata(const struct i2c_client *client); 75 void *i2c_get_clientdata(const struct i2c_client *client);
76 76
77Note that starting with kernel 2.6.34, you don't have to set the `data' field
78to NULL in remove() or if probe() failed anymore. The i2c-core does this
79automatically on these occasions. Those are also the only times the core will
80touch this field.
81
77 82
78Accessing the client 83Accessing the client
79==================== 84====================
@@ -318,8 +323,9 @@ Plain I2C communication
318These routines read and write some bytes from/to a client. The client 323These routines read and write some bytes from/to a client. The client
319contains the i2c address, so you do not have to include it. The second 324contains the i2c address, so you do not have to include it. The second
320parameter contains the bytes to read/write, the third the number of bytes 325parameter contains the bytes to read/write, the third the number of bytes
321to read/write (must be less than the length of the buffer.) Returned is 326to read/write (must be less than the length of the buffer, also should be
322the actual number of bytes read/written. 327less than 64k since msg.len is u16.) Returned is the actual number of bytes
328read/written.
323 329
324 int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msg, 330 int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msg,
325 int num); 331 int num);