All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Blecker <matthewb@chromium.org>
To: Wolfram Sang <wsa@the-dreams.de>, linux-i2c@vger.kernel.org
Cc: Matthew Blecker <matthewb@chromium.org>
Subject: [PATCH 0/1] i2c: Add i2c-pseudo driver for userspace I2C adapters.
Date: Thu,  7 May 2020 16:05:12 -0700	[thread overview]
Message-ID: <20200507230513.246804-1-matthewb@google.com> (raw)

From: Matthew Blecker <matthewb@chromium.org>

This patch adds i2c-pseudo, a module that provides I2C adapters backed by
userspace programs. This allows for userspace implementations of
functionality such as tunneling I2C through another communication channel,
or mocking of real I2C devices whose behavior cannot be modeled with
i2c-stub.

Module naming: A pseudo I2C adapter is analogous to a pseudo terminal.

In the Chromium OS ecosystem we are using this for a userspace I2C adapter
built on top of an existing userspace I2C-over-USB implementation used with
embedded debug devices that act as I2C master to a device under test (DUT).
This arrangement is used for interacting with I2C slaves on the DUT,
particularly for transferring firmware to an embedded controller IC which
receives programming via I2C.

That I2C pseudo controller implementation is here:
https://chromium.googlesource.com/chromiumos/third_party/hdctools/+/refs/heads/master/servo/interface/i2c_pseudo.py

Matthew Blecker (1):
  i2c: Add new i2c-pseudo driver for userspace I2C adapters.

 .../i2c/pseudo-controller-interface.rst       |  305 ++
 drivers/i2c/Kconfig                           |   17 +-
 drivers/i2c/Makefile                          |    1 +
 drivers/i2c/i2c-pseudo.c                      | 3198 +++++++++++++++++
 4 files changed, 3520 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/i2c/pseudo-controller-interface.rst
 create mode 100644 drivers/i2c/i2c-pseudo.c

-- 
2.26.2.526.g744177e7f7-goog


             reply	other threads:[~2020-05-07 23:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-07 23:05 Matthew Blecker [this message]
2020-05-07 23:05 ` [PATCH 1/1] i2c: Add i2c-pseudo driver for userspace I2C adapters Matthew Blecker
2020-05-08 20:36   ` kbuild test robot
2020-05-08 20:36     ` kbuild test robot
2020-05-09  1:43   ` kbuild test robot
2020-05-09  1:43     ` kbuild test robot
2020-05-09  1:43   ` [PATCH] i2c: fix stream_open.cocci warnings kbuild test robot
2020-05-09  1:43     ` kbuild test robot

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=20200507230513.246804-1-matthewb@google.com \
    --to=matthewb@chromium.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=wsa@the-dreams.de \
    /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 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.