Skip to content

Commit e5e3df0

Browse files
nxpfranklialexandrebelloni
authored andcommitted
i3c: add actual_len in i3c_priv_xfer
In MIPI I3C Specification: "Ninth Bit of SDR Target Returned (Read) Data as End-of-Data: In I2C, the ninth Data bit from Target to Controller is an ACK by the Controller. By contrast, in I3C this bit allows the Target to end a Read, and allows the Controller to Abort a Read. In SDR terms, the ninth bit of Read data is referred to as the T-Bit (for ‘Transition’)" I3C allow devices early terminate data transfer. So need "actual_len" field to indicate how much get by i3c_priv_xfer. Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Frank Li <Frank.Li@nxp.com> Link: https://lore.kernel.org/r/20231201222532.2431484-4-Frank.Li@nxp.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
1 parent 05b26c3 commit e5e3df0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/linux/i3c/device.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ enum i3c_hdr_mode {
5454
* struct i3c_priv_xfer - I3C SDR private transfer
5555
* @rnw: encodes the transfer direction. true for a read, false for a write
5656
* @len: transfer length in bytes of the transfer
57+
* @actual_len: actual length in bytes are transferred by the controller
5758
* @data: input/output buffer
5859
* @data.in: input buffer. Must point to a DMA-able buffer
5960
* @data.out: output buffer. Must point to a DMA-able buffer
@@ -62,6 +63,7 @@ enum i3c_hdr_mode {
6263
struct i3c_priv_xfer {
6364
u8 rnw;
6465
u16 len;
66+
u16 actual_len;
6567
union {
6668
void *in;
6769
const void *out;

0 commit comments

Comments
 (0)