All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] i2c-tools: Make tools accept bus path
@ 2026-05-30 20:06 Brigham Campbell
  2026-05-30 20:06 ` [PATCH v3 1/2] i2c-tools: Allow passing device file paths Brigham Campbell
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Brigham Campbell @ 2026-05-30 20:06 UTC (permalink / raw)
  To: Jean Delvare, linux-i2c
  Cc: Wolfram Sang, Brigham Campbell, Gero Schwäricke

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.

I've tested these changes by running i2cdetect, i2cget, and i2cset.
Please be aware that my current test setup has an i801 bus controller
with what seems to be no slave devices connected, so my testing has been
superficial, involving mostly failed read/writes. This patch series only
touches code that actually opens the character device file, so I'm
satisfied with this testing. If maintainers prefer, I'm happy to test
more rigorously.

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.

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   | 40 ++++++++++++++++++++++++++++++++++------
 tools/i2cbusses.h   |  4 +++-
 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, 82 insertions(+), 67 deletions(-)
---
base-commit: c1b0305972e89aae048068a3b228f35ef0206243
change-id: 20260530-accept-device-path-539164c9c1df

Best regards,
--  
Brigham Campbell <me@brighamcampbell.com>


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-07-07  1:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-30 20:06 [PATCH v3 0/2] i2c-tools: Make tools accept bus path Brigham Campbell
2026-05-30 20:06 ` [PATCH v3 1/2] i2c-tools: Allow passing device file paths Brigham Campbell
2026-05-30 20:06 ` [PATCH v3 2/2] i2c-tools: Document device paths as I2CBUS arg Brigham Campbell
2026-07-06  3:46 ` [PATCH v3 0/2] i2c-tools: Make tools accept bus path Stephen Horvath
2026-07-06 15:12   ` Wolfram Sang
2026-07-07  1:13     ` Stephen Horvath

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.