From be27ed672878bdfb38580b491270f38cc5c36b38 Mon Sep 17 00:00:00 2001 From: Wolfram Sang Date: Wed, 4 Jun 2025 12:18:28 +0200 Subject: [PATCH] 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: Wolfram Sang Reviewed-by: Frank Li Link: https://lore.kernel.org/r/20250604101831.56585-3-wsa+renesas@sang-engineering.com Signed-off-by: Alexandre Belloni --- drivers/i3c/master/i3c-master-cdns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i3c/master/i3c-master-cdns.c b/drivers/i3c/master/i3c-master-cdns.c index fd3752cea6549..562e49e930b45 100644 --- a/drivers/i3c/master/i3c-master-cdns.c +++ b/drivers/i3c/master/i3c-master-cdns.c @@ -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; -- 2.47.2