diff options
| author | Frank Li <Frank.Li@nxp.com> | 2023-12-02 01:25:29 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-06-12 12:12:49 +0300 |
| commit | fe52ab31f050e25aee3122d2452b4733506d3a3d (patch) | |
| tree | 5dbb50ea3b4177205d12504ce0eaef5aa5200623 /include/linux | |
| parent | 04207a9c64e0b16dac842e5b2ecfa53af25bdea7 (diff) | |
| download | linux-fe52ab31f050e25aee3122d2452b4733506d3a3d.tar.xz | |
i3c: add actual_len in i3c_priv_xfer
[ Upstream commit e5e3df06ac98d15cfb10bb5c12356709365e91b2 ]
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>
Stable-dep-of: 7f3d633b460b ("i3c: master: svc: change ENXIO to EAGAIN when IBI occurs during start frame")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/i3c/device.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/i3c/device.h b/include/linux/i3c/device.h index 90fa83464f00..ef6217da8253 100644 --- a/include/linux/i3c/device.h +++ b/include/linux/i3c/device.h @@ -54,6 +54,7 @@ enum i3c_hdr_mode { * struct i3c_priv_xfer - I3C SDR private transfer * @rnw: encodes the transfer direction. true for a read, false for a write * @len: transfer length in bytes of the transfer + * @actual_len: actual length in bytes are transferred by the controller * @data: input/output buffer * @data.in: input buffer. Must point to a DMA-able buffer * @data.out: output buffer. Must point to a DMA-able buffer @@ -62,6 +63,7 @@ enum i3c_hdr_mode { struct i3c_priv_xfer { u8 rnw; u16 len; + u16 actual_len; union { void *in; const void *out; |
