Commit be27ed67 authored by Wolfram Sang's avatar Wolfram Sang Committed by Alexandre Belloni
Browse files

i3c: master: cdns: use adapter timeout value for I2C transfers



I2C adapters have their own timeout value which can be changed by
userspace if desired. Use it for I2C transfers. The default is 1Hz, so
the default behaviour is unchanged.

Signed-off-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: default avatarFrank Li <Frank.Li@nxp.com>
Link: https://lore.kernel.org/r/20250604101831.56585-3-wsa+renesas@sang-engineering.com


Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent 1b84691e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -863,7 +863,7 @@ static int cdns_i3c_master_i2c_xfers(struct i2c_dev_desc *dev,
	}

	cdns_i3c_master_queue_xfer(master, xfer);
	if (!wait_for_completion_timeout(&xfer->comp, msecs_to_jiffies(1000)))
	if (!wait_for_completion_timeout(&xfer->comp, m->i2c.timeout))
		cdns_i3c_master_unqueue_xfer(master, xfer);

	ret = xfer->ret;