Thread (60 messages) 60 messages, 12 authors, 2012-11-14
STALE4962d
Revisions (5)
  1. v1 current
  2. v2 [diff vs current]
  3. v1 [diff vs current]
  4. v1 [diff vs current]
  5. v1 [diff vs current]

[PATCH 7/8] i2c: add 'transferred' field to struct i2c_msg

From: Felipe Balbi <hidden>
Date: 2012-10-22 09:46:57
Also in: linux-i2c, linux-omap
Subsystem: i2c subsystem, the rest · Maintainers: Andi Shyti, Linus Torvalds

From: Shubhrajyoti D <redacted>

In case of a NACK, it's wise to tell our clients
drivers about how many bytes were actually transferred.

Support this by adding an extra field to the struct
i2c_msg which gets incremented the amount of bytes
actually transferred.

Signed-off-by: Shubhrajyoti D <redacted>
Signed-off-by: Felipe Balbi <redacted>
---
 include/uapi/linux/i2c.h | 1 +
 1 file changed, 1 insertion(+)
diff --git a/include/uapi/linux/i2c.h b/include/uapi/linux/i2c.h
index 0e949cb..4b35c9b 100644
--- a/include/uapi/linux/i2c.h
+++ b/include/uapi/linux/i2c.h
@@ -77,6 +77,7 @@ struct i2c_msg {
 #define I2C_M_NO_RD_ACK		0x0800	/* if I2C_FUNC_PROTOCOL_MANGLING */
 #define I2C_M_RECV_LEN		0x0400	/* length will be first received byte */
 	__u16 len;		/* msg length				*/
+	__u16 transferred;	/* actual bytes transferred             */
 	__u8 *buf;		/* pointer to msg data			*/
 };
 
-- 
1.8.0.rc0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help