Re: [PATCH] i2c-tools: i2ctransfer: Set I2C adapter timeout using I2C_TIMEOUT ioctl

Wolfram Sang <[email protected]> Tue, 21 Jul 2026 08:53:31 +0200
Newsgroups org.kernel.vger.linux-i2c
Message-ID <al8Xa6P7YYRwOn3D@shikoro>
Hi,

>   Thanks for the review. Your suggestion makes sense to me - I'll move
>   it out of i2ctransfer and add -T (timeout) and -R (retries) to
>   i2cdetect instead. I agree a separate i2cconfig tool is not needed.

Great, thanks.

>   While checking the list of ioctls, I observed the I2C_TIMEOUT ioctl
>   to set the timeout, but I did not observe any "get" ioctl to read
>   the timeout value back from user space (same for retries). So
>   setting a value with -T/-R works, but reading the current value
>   (when no value is given) does not seem possible right now.

You are right. That shows how seldom those IOCTLs are used. I forgot
that one cannot read them, sorry about that.

>   Could you let me know how you would like me to handle this - should
>   I keep -T/-R as set-only for now?

Yes. This is the way to go.

Happy hacking,

   Wolfram
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAmpfF2oACgkQFA3kzBSg
KbZhbA//Yr0TbpkW5aZGVwRetVZyYrKwX0VPP7EkUEgznL/B+tHh0WCfmX18H27Q
6ihGxRjpn8hqjDtFLlGuqFtlzrLKryRS7mk/2wMLTf/0Fo3V5h5B3qK7cYVRxG5w
4GEG7pxQApimAjAhzGM7VEoOYWaAn9CJCH/MxspuMSkrYaisQ2NkPJQMCba3odo1
2KWuQtalSSp+QjVqsKhEVXqQX/p90CDdBVR70dTsj51ck/E8PcGkrUKj9xS8/nSL
EbR6ctG8xNFMy3jSDDTDRCDAOXR7vQICZpdqNMl8iOqsaE1++v1kM3w+vLPAqlZp
tcb2oRlCWJLtt3IIiXOw9AC2PopDakJ5cj07EKFskNaL4kQZXRsaFqylP57vdU+s
GnChx2RpRP+5f9AU6FNtGrceVZw/yel9wpoX2bVywUK7tawPLDEnbtKlfLFDZNJw
RNphIxdHbiupSgTm9mbyD/N90yj1SQyqCxrOP3KbaNqVy3e/CqRSY9dRj2xD1AlN
IdphqKGMKwEaU2BNfjOFOmLpc+SmZ+onbf25rzkN66EkD4vgG4wedV3hrEATKJwX
ik3TvEr90DDW6uNONoZBUaCR5ryBOihCFIhhKVwI2jevE5bDN2/OH/7sQ8snAn0x
Foyf6JaYCMoIqexgXddqbhqQ1wSpbi0R/R7cxKAKIpT8uXdJjQE=
=/L/c
-----END PGP SIGNATURE-----