Linux I2C development
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: Vasantha Likitha T <vasanthalikitha.tandra@amd.com>
Cc: linux-i2c@vger.kernel.org, andi.shyti@kernel.org,
	michal.simek@amd.com, linux-kernel@vger.kernel.org, git@amd.com
Subject: Re: [PATCH v2] i2c-tools: i2cdetect: Set I2C adapter timeout and retries using ioctl
Date: Sun, 15 Nov 2026 23:41:15 +0100	[thread overview]
Message-ID: <avo1CsZ8z4ODuwJo@shikoro> (raw)
In-Reply-To: <20261109171924.3632557-1-vasanthalikitha.tandra@amd.com>

[-- Attachment #1: Type: text/plain, Size: 1114 bytes --]

Hi Vasantha,

> Changes in v2:
> - Move the change from i2ctransfer to i2cdetect and add -T and -R options,
> as suggested in review.

Better, but still not quite there yet, I would think...

> ---
>  tools/i2cdetect.c | 41 ++++++++++++++++++++++++++++++++++++++---
>  1 file changed, 38 insertions(+), 3 deletions(-)
> 
> diff --git a/tools/i2cdetect.c b/tools/i2cdetect.c
> index 3c22f17..8b08e55 100644
> --- a/tools/i2cdetect.c
> +++ b/tools/i2cdetect.c
> @@ -35,11 +35,14 @@
>  static void help(void)
>  {
>  	fprintf(stderr,
> -		"Usage: i2cdetect [-y] [-a] [-q|-r] I2CBUS [FIRST LAST]\n"
> +		"Usage: i2cdetect [-y] [-a] [-q|-r] [-T TIMEOUT] [-R RETRIES]\n"
> +		"                 I2CBUS [FIRST LAST]\n"

Putting it there to a "regular" detect means that you cannot set timeout
or retries without scanning a bus. I think we probably want to drop it
here and do something like

>  		"       i2cdetect -F I2CBUS\n"
+		"	i2cdetect -T TIMEOUT | -R RETRIES I2CBUS\n"

which allows settings these values and do nothing else.

What do you think?

Happy hacking,

   Wolfram


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2026-11-15 22:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-09 17:19 [PATCH v2] i2c-tools: i2cdetect: Set I2C adapter timeout and retries using ioctl Vasantha Likitha T
2026-11-15 22:41 ` 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=avo1CsZ8z4ODuwJo@shikoro \
    --to=wsa+renesas@sang-engineering.com \
    --cc=andi.shyti@kernel.org \
    --cc=git@amd.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.simek@amd.com \
    --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