[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aIc68UkzN_l0gZ_D@shikoro>
Date: Mon, 28 Jul 2025 10:55:13 +0200
From: Wolfram Sang <wsa+renesas@...g-engineering.com>
To: Manikanta Guntupalli <manikanta.guntupalli@....com>
Cc: git@....com, michal.simek@....com, peda@...ntia.se,
linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org,
radhey.shyam.pandey@....com, srinivas.goud@....com,
shubhrajyoti.datta@....com, manikantaguntupalli09@...il.com,
Jonathan Stroud <jonathan.stroud@....com>
Subject: Re: [PATCH 1/1] PCA9541: Increase I2C bus arbitration timeout
Hi,
thanks for your patch.
> /* arbitration timeouts, in jiffies */
> -#define ARB_TIMEOUT (HZ / 8) /* 125 ms until forcing bus ownership */
> -#define ARB2_TIMEOUT (HZ / 4) /* 250 ms until acquisition failure */
> +#define ARB_TIMEOUT (HZ) /* 1 s until forcing bus ownership */
> +#define ARB2_TIMEOUT (2 * HZ) /* 2 s until acquisition failure */
Can't we use the timeout value of the parent struct i2c_adapter? This is
by default HZ and can be set by userspace via IOCTL depending on the
actual use case. So, we would use (pseudo-code, probably):
254 unsigned long timeout = jiffies + 2 * client->adapter->timeout;
255 /* give up after this time */
256
257 data->arb_timeout = jiffies + client->adapter->timeout;
?
> + dev_info(&client->dev, "I2C Bus Arbiter timeout, forcing take bus\n");
'dev_warn' for both?
Happy hacking,
Wolfram
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists