From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: Vasantha Likitha T <vasanthalikitha.tandra@amd.com>
Cc: linux-i2c@vger.kernel.org, jdelvare@suse.de, git@amd.com
Subject: Re: [PATCH] i2c-tools: i2ctransfer: Set I2C adapter timeout using I2C_TIMEOUT ioctl
Date: Tue, 21 Jul 2026 00:10:33 +0200 [thread overview]
Message-ID: <al6c2VXwLFcNRLu7@shikoro> (raw)
In-Reply-To: <20260720163401.2001860-1-vasanthalikitha.tandra@amd.com>
[-- Attachment #1: Type: text/plain, Size: 1451 bytes --]
Hi,
thank you for this patch!
On Mon, Jul 20, 2026 at 10:04:01PM +0530, Vasantha Likitha T wrote:
> Add a -t TIMEOUT option that calls ioctl(I2C_TIMEOUT) before the
> I2C_RDWR transfer. This allows the adapter timeout to be set from
> user space at runtime, controlling how long the I2C core waits for
> a transfer to complete before returning an error. Drivers that rely
> on the adapter timeout will use the value set by this ioctl.
>
> The timeout value is specified in units of 10 ms, as this is the unit
> the Linux kernel expects for the I2C_TIMEOUT ioctl: i2c-dev converts it
> with adapter->timeout = msecs_to_jiffies(arg * 10). Omitting -t leaves
> the driver default unchanged.
I agree that reading/setting TIMEOUT is missing in i2c-tools (same with
RETRIES) and it would be nice to have.
I don't think 'i2ctransfer' is the right place for it, though. One might
also want a different timeout with 'i2cget' or so.
My suggestion is to add it to 'i2cdetect'. It already has '-F' to list
the features of an adapter. We could add '-T' to read the timeout value
and '-R' to read the retries value. If '-T' or '-R' parameters also
contain a value, then this value will be written to the adapter.
Was this undestandable? Do you agree?
Another option would be to write a dedicated tool ('i2cconfig'?) for
handling extra parameters, but it feels a bit bloated IMHO.
Opinions?
All the best,
Wolfram
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2026-07-20 22:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-20 16:34 [PATCH] i2c-tools: i2ctransfer: Set I2C adapter timeout using I2C_TIMEOUT ioctl Vasantha Likitha T
2026-07-20 22:10 ` Wolfram Sang [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=al6c2VXwLFcNRLu7@shikoro \
--to=wsa+renesas@sang-engineering.com \
--cc=git@amd.com \
--cc=jdelvare@suse.de \
--cc=linux-i2c@vger.kernel.org \
--cc=vasanthalikitha.tandra@amd.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