i3c: dw: minor changes
Subsystems (2)
cover i3c: dw: minor changes
This series contains a minor fix for the dw driver, and a small cleanup
+ comment.
Jeremy Kerr (1):
i3c: dw: use bus mode rather than device reg for conditional tCAS
setting
Matt Johnston (1):
i3c: dw: Return the length from a read priv_xfer
drivers/i3c/master/dw-i3c-master.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
Signature · 7 lines
2.39.2 -- linux-i3c mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-i3c
PATCH 1/2 i3c: dw: Return the length from a read priv_xfer
From: Matt Johnston <[email protected]>
We currently assume that the rx_len of a read command will be as submitted, but we may have a shorter read than expected.
This change populates the output i3c xfer length from the actually-read length.
--- drivers/i3c/master/dw-i3c-master.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/i3c/master/dw-i3c-master.c +7 -0
@@ -887,6 +887,13 @@ static int dw_i3c_master_priv_xfers(struct i3c_dev_desc *dev,if (!wait_for_completion_timeout (&xfer->comp,XFER_TIMEOUT ))dw_i3c_master_dequeue_xfer (master, xfer); +for (i =0 ; i < i3c_nxfers; i++) { +struct dw_i3c_cmd *cmd = &xfer->cmds[i]; + +if (i3c_xfers[i].rnw) + i3c_xfers[i].len = cmd->rx_len; + } + ret = xfer->ret;dw_i3c_master_free_xfer (xfer);
Signature · 7 lines
2.39.2 -- linux-i3c mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-i3c
PATCH 2/2 i3c: dw: use bus mode rather than device reg for conditional tCAS setting
In reply to Jeremy KerrIn the clock setup path, we set the hardware DEV_CTRL_I2C_SLAVE_PRESENT bit on a shared mode bus, then read-back this bit for the conditional tCAS set.
Instead, just use the bus->mode setting for the conditional test.
While we're at it, add a little comment about why the conditional is there.
--- drivers/i3c/master/dw-i3c-master.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/i3c/master/dw-i3c-master.c +5 -1
@@ -538,7 +538,11 @@ static int dw_i3c_clk_cfg(struct dw_i3c_master *master) scl_timing =SCL_I3C_TIMING_HCNT (hcnt) |SCL_I3C_TIMING_LCNT (lcnt);writel (scl_timing, master->regs +SCL_I3C_PP_TIMING ); -if (!(readl (master->regs +DEVICE_CTRL ) &DEV_CTRL_I2C_SLAVE_PRESENT )) +/* +* In pure i3c mode, MST_FREE represents tCAS. In shared mode, this +* will be set up by dw_i2c_clk_cfg as tLOW. +*/ +if (master->base.bus.mode ==I3C_BUS_MODE_PURE )writel (BUS_I3C_MST_FREE (lcnt), master->regs +BUS_FREE_TIMING ); lcnt = max_t(u8,
Signature · 7 lines
2.39.2 -- linux-i3c mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-i3c
Quoted 8 lines · Jeremy Kerr
This series contains a minor fix for the dw driver, and a small cleanup
+ comment.Jeremy Kerr (1):
i3c: dw: use bus mode rather than device reg for conditional tCAS
setting[...]
Applied, thanks!
[1/2] i3c: dw: Return the length from a read priv_xfer
commit: 67df5ce9dd8870d3e53de5ebd6aecf609b713044
[2/2] i3c: dw: use bus mode rather than device reg for conditional tCAS setting
commit: 66b32e3d2c6daeeafb80fa41f3a41e4c0ab85cc6Signature · 8 lines
Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com -- linux-i3c mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-i3c