public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: "Benoît Monin" <benoit.monin@bootlin.com>
To: linux-i2c@vger.kernel.org
Cc: "Jean Delvare" <jdelvare@suse.de>,
	"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
	"Benoît Monin" <benoit.monin@bootlin.com>
Subject: [PATCH i2c-tools v2 0/2] Add support for message modifier flags
Date: Tue, 23 Dec 2025 14:22:41 +0100	[thread overview]
Message-ID: <20251223-msg-flags-v2-0-8d934a4366e2@bootlin.com> (raw)

I2C messages can be modified with a set of flags covered by the protocol
mangling and the skip repeated start functionalities. This series add
support for such flags to i2cdetect and i2ctransfer.

The first patch shows the support of protocol mangling and repeated
start skipping in the output of 'i2cdetect -F'.

The second patch adds the parsing of optional flags to i2ctransfer
message description. Those command-line flags then set the i2c message
flags alongside the read/write flag.

I wrote these changes to test the insertion of I2C_M_STOP flag in
multi-message transactions with i2ctransfer, but the other flags can be
useful for various test scenarios.

The patches use defines that have been present in the kernel since
v3.6 released in 2012. If compatibility with older kernel is required,
we will need to wrap some of them with #ifndef ... #endif.

Maybe a minimum kernel version can be documented in the README?

Signed-off-by: Benoît Monin <benoit.monin@bootlin.com>
---
Changes in v2:
- Document the flags in i2ctransfer.8 man page.
- Link to v1: https://lore.kernel.org/r/20251128-msg-flags-v1-0-6353f26fa6bc@bootlin.com

---
Benoît Monin (2):
      i2cdetect: Display mangling and nostart support
      i2ctransfer: Add optional message modifier flags

 tools/i2cdetect.c   |  4 ++++
 tools/i2ctransfer.8 | 26 +++++++++++++++++++++++++-
 tools/i2ctransfer.c | 34 +++++++++++++++++++++++++---------
 3 files changed, 54 insertions(+), 10 deletions(-)
---
base-commit: ea51da725b743da00b894dfdc4ab189f5a51e90e
change-id: 20251127-msg-flags-3d2b2da9ae28

Best regards,
-- 
Benoît Monin, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


             reply	other threads:[~2025-12-23 13:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-23 13:22 Benoît Monin [this message]
2025-12-23 13:22 ` [PATCH i2c-tools v2 1/2] i2cdetect: Display mangling and nostart support Benoît Monin
2026-01-13 17:22   ` Wolfram Sang
2025-12-23 13:22 ` [PATCH i2c-tools v2 2/2] i2ctransfer: Add optional message modifier flags Benoît Monin
2026-01-13 17:33   ` Wolfram Sang
2026-01-16 13:01     ` Benoît Monin
2026-01-20 15:06       ` Jean Delvare
2026-01-20 14:45   ` Jean Delvare
2026-01-13 17:21 ` [PATCH i2c-tools v2 0/2] Add support for " Wolfram Sang
2026-01-20 14:15 ` Jean Delvare
2026-01-21 10:00   ` Benoît Monin
2026-01-21 18:37     ` Jean Delvare

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=20251223-msg-flags-v2-0-8d934a4366e2@bootlin.com \
    --to=benoit.monin@bootlin.com \
    --cc=jdelvare@suse.de \
    --cc=linux-i2c@vger.kernel.org \
    --cc=thomas.petazzoni@bootlin.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