From: Mukesh Savaliya <mukesh.savaliya@oss.qualcomm.com>
To: Aniket Randive <aniket.randive@oss.qualcomm.com>,
Wolfram Sang <wsa+renesas@sang-engineering.com>,
Andi Shyti <andi.shyti@kernel.org>,
Dmitry Guzman <Dmitry.Guzman@mobileye.com>
Cc: Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>,
linux-i2c@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v8 0/2] i2c: Add dynamic transfer timeout based on message length and frequency
Date: Mon, 7 Sep 2026 12:42:12 +0530 [thread overview]
Message-ID: <22988ce3-280b-4ab3-acfd-921e64e137ea@oss.qualcomm.com> (raw)
In-Reply-To: <20260827-master-v8-0-596bc81c5cf9@oss.qualcomm.com>
On 8/27/2026 5:57 PM, Aniket Randive wrote:
> The I2C core and many controller drivers currently rely on a fixed
> timeout value that does not account for transfer characteristics such as
> message length or bus frequency. This can make the timeout unnecessarily
> large for short transfers, while longer transfers at lower bus
> frequencies may require a timeout that better matches the expected
> transfer duration.
>
> Introduce a generic helper API in the I2C core to calculate a
> transfer-specific timeout from the expected wire time of a transaction.
> Store the computed value in adap->timeout so that both the I2C core retry
> logic and controller drivers use a timeout value that reflects the
> current transfer.
>
> Keep timeout policy decisions within individual controller drivers. Let
> drivers provide their own safety margins and minimum timeout floors, and
> avoid exposing those driver-specific policy values as part of the
> generic API.
>
> Convert the Qualcomm GENI I2C driver to use the helper while preserving
> its existing timeout policy. Preserve the static timeout behaviour when
> CONFIG_I2C_DYNAMIC_TIMEOUT is disabled, and let a userspace-configured
> I2C_TIMEOUT value take precedence over the computed timeout.
>
> Suggested-by: Dmitry Guzman <Dmitry.Guzman@mobileye.com>
>
Keep demarcation here ---
> Changes in v8:
> - Compute GPI multi-descriptor timeout using the total length of all
> messages in the batch, since completion is reported only after the
> entire batch finishes.
> - Guard against zero bus frequency in i2c_update_timeout() with
> WARN_ON_ONCE() and retain the existing timeout as a safe fallback.
> - Link to v7: https://patch.msgid.link/20260813-master-v7-0-3f9010cf9229@oss.qualcomm.com
>
[...]
prev parent reply other threads:[~2026-09-07 7:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-27 12:27 [PATCH v8 0/2] i2c: Add dynamic transfer timeout based on message length and frequency Aniket Randive
2026-08-27 12:27 ` [PATCH v8 1/2] i2c: core: Add i2c_update_timeout() helper for dynamic transfer timeouts Aniket Randive
2026-09-07 7:22 ` Mukesh Savaliya
2026-08-27 12:27 ` [PATCH v8 2/2] i2c: qcom-geni: Add dynamic transfer timeout based on transfer length and frequency Aniket Randive
2026-09-07 7:24 ` Mukesh Savaliya
2026-09-07 7:12 ` Mukesh Savaliya [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=22988ce3-280b-4ab3-acfd-921e64e137ea@oss.qualcomm.com \
--to=mukesh.savaliya@oss.qualcomm.com \
--cc=Dmitry.Guzman@mobileye.com \
--cc=andi.shyti@kernel.org \
--cc=aniket.randive@oss.qualcomm.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viken.dadhaniya@oss.qualcomm.com \
--cc=wsa+renesas@sang-engineering.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox