Linux I2C development
 help / color / mirror / Atom feed
From: Brigham Campbell <me@brighamcampbell.com>
To: Jean Delvare <jdelvare@suse.de>, linux-i2c@vger.kernel.org
Cc: "Wolfram Sang" <wsa+renesas@sang-engineering.com>,
	"Brigham Campbell" <me@brighamcampbell.com>,
	"Gero Schwäricke" <gero.schwaericke@sevenlab.de>
Subject: [PATCH v5 0/2] i2c-tools: Make tools accept bus path
Date: Wed, 22 Jul 2026 02:52:39 -0600	[thread overview]
Message-ID: <20260722-accept-device-path-v5-0-9c0bf9b4da26@brighamcampbell.com> (raw)

The purpose of this series is to make i2c-tools userspace utilities
accept an i2c bus character device file path as an argument. This is
useful, for example, if a sysadmin creates udev rules to create a
persistent symlink to an i2c bus and wishes to use that symlink with
i2c-tools.

Since v1:
 * Scrapped brittle checking against device major number 89 in favor of
   an i2c_bus_hint variant struct.
Since v2:
 * Scrapped i2c_bus_hint variant in favor of combining the lookup and
   open steps into one function. No more awkward variant.
Since v3:
 * Rebased onto `master` and fixed minor conflicts.
Since v4:
 * Inline much of the functionality of open_i2c_dev.
 * Where possible, make functions static.

Signed-off-by: Brigham Campbell <me@brighamcampbell.com>
---
Brigham Campbell (2):
      i2c-tools: Allow passing device file paths
      i2c-tools: Document device paths as I2CBUS arg

 tools/i2cbusses.c   | 127 ++++++++++++++++++++++++++++++----------------------
 tools/i2cbusses.h   |   3 +-
 tools/i2cdetect.8   |   8 ++--
 tools/i2cdetect.c   |  14 +++---
 tools/i2cdump.8     |   7 +--
 tools/i2cdump.c     |  14 +++---
 tools/i2cget.8      |   9 ++--
 tools/i2cget.c      |  13 +++---
 tools/i2cset.8      |  12 ++---
 tools/i2cset.c      |  13 +++---
 tools/i2ctransfer.8 |   2 +-
 tools/i2ctransfer.c |  13 +++---
 12 files changed, 120 insertions(+), 115 deletions(-)
---
base-commit: 5852f5375eea6ca9dabf31f4772cb8b8ecc905d8
change-id: 20260530-accept-device-path-539164c9c1df

Thanks!
-- 
Brigham Campbell
https://brighamcampbell.com


             reply	other threads:[~2026-07-22  8:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-22  8:52 Brigham Campbell [this message]
2026-07-22  8:52 ` [PATCH v5 1/2] i2c-tools: Allow passing device file paths Brigham Campbell
2026-07-22  8:52 ` [PATCH v5 2/2] i2c-tools: Document device paths as I2CBUS arg Brigham Campbell

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=20260722-accept-device-path-v5-0-9c0bf9b4da26@brighamcampbell.com \
    --to=me@brighamcampbell.com \
    --cc=gero.schwaericke@sevenlab.de \
    --cc=jdelvare@suse.de \
    --cc=linux-i2c@vger.kernel.org \
    --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