mbox series

[v2,0/4] i2c: testunit: add rep_start test and rework versioning

Message ID 20240811212317.16119-1-wsa+renesas@sang-engineering.com
Headers show
Series i2c: testunit: add rep_start test and rework versioning | expand

Message

Wolfram Sang Aug. 11, 2024, 9:23 p.m. UTC
On my way to let the testunit trigger SMBusAlert interrupts, I needed to
rework the way the testunit responds to read messages. This series is
the result of that with some very nice side effects. First, we now have
a new test to check for proper repeated starts between messages in a
transfer which will also improve versioning (patch 3). Also, the state
of the testunit can now be checked (patch 4). Patch 1 makes the state
machine a little easiert to follow. And patch 2 improves documentation.

The patches are based on Linus' tree close to rc3 and has been tested on
a Renesas Lager board (R-Car H2) and a Renesas Falcon board (R-Car V3U).

Looking forward to comments. Once we got this in, I will send out the
SMBusAlert additions. They do work already, they just need some
documentation.

Changes since v1:
* patch 2 added to improve documentation
* added newline to the version string to make its printout
  "self-contained"
* for reading the new version string, the shell one liner to print
  ASCII directly has been removed. Now we use a new feature of
  i2ctransfer. Note, the docs mention version 4.4 already which is not
  out yet, but it will be by the time 6.11 is released (tm).
* rebased, dependencies are now in Linus' tree

Happy hacking!


Wolfram Sang (4):
  i2c: testunit: sort case blocks
  i2c: testunit: use decimal values in docs when appropriate
  i2c: testunit: add command to support versioning and test rep_start
  i2c: testunit: return current command on read messages

 Documentation/i2c/slave-testunit-backend.rst | 60 ++++++++++++++++----
 drivers/i2c/i2c-slave-testunit.c             | 43 ++++++++++----
 2 files changed, 82 insertions(+), 21 deletions(-)