linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i2c: testunit: improve documentation
@ 2020-09-28 11:06 Wolfram Sang
  2020-10-05 20:56 ` Wolfram Sang
  0 siblings, 1 reply; 2+ messages in thread
From: Wolfram Sang @ 2020-09-28 11:06 UTC (permalink / raw)
  To: linux-i2c; +Cc: linux-renesas-soc, Wolfram Sang

Mention that new CMDs will be NACKed while the old one is still
on-going, that the I2C address parameter of READ_BYTES is 7 bit only,
and reword one paragraph to be more precise.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 Documentation/i2c/slave-testunit-backend.rst | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/Documentation/i2c/slave-testunit-backend.rst b/Documentation/i2c/slave-testunit-backend.rst
index f537c62a8a83..2c38e64f0bac 100644
--- a/Documentation/i2c/slave-testunit-backend.rst
+++ b/Documentation/i2c/slave-testunit-backend.rst
@@ -20,10 +20,10 @@ Instantiating the device is regular. Example for bus 0, address 0x30:
 
 # echo "slave-testunit 0x1030" > /sys/bus/i2c/devices/i2c-0/new_device
 
-After that, you will have a write-only device listening. Reads will return an
-8-bit version number. The device consists of 4 8-bit registers and all must be
-written to start a testcase, i.e. you must always write 4 bytes to the device.
-The registers are:
+After that, you will have a write-only device listening. Reads will just return
+an 8-bit version number of the testunit. When writing, the device consists of 4
+8-bit registers and all must be written to start a testcase, i.e. you must
+always write 4 bytes to the device. The registers are:
 
 0x00 CMD   - which test to trigger
 0x01 DATAL - configuration byte 1 for the test
@@ -35,6 +35,9 @@ Using 'i2cset' from the i2c-tools package, the generic command looks like:
 # i2cset -y <bus_num> <testunit_address> <CMD> <DATAL> <DATAH> <DELAY> i
 
 DELAY is a generic parameter which will delay the execution of the test in CMD.
+While a command is running (including the delay), new commands will not be
+acknowledged. You need to wait until the old one is completed.
+
 The commands are described in the following section. An invalid command will
 result in the transfer not being acknowledged.
 
@@ -44,7 +47,7 @@ Commands
 0x00 NOOP (reserved for future use)
 
 0x01 READ_BYTES (also needs master mode)
-   DATAL - address to read data from
+   DATAL - address to read data from (lower 7 bits, highest bit currently unused)
    DATAH - number of bytes to read
 
 This is useful to test if your bus master driver is handling multi-master
-- 
2.28.0


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

* Re: [PATCH] i2c: testunit: improve documentation
  2020-09-28 11:06 [PATCH] i2c: testunit: improve documentation Wolfram Sang
@ 2020-10-05 20:56 ` Wolfram Sang
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfram Sang @ 2020-10-05 20:56 UTC (permalink / raw)
  To: linux-i2c; +Cc: linux-renesas-soc

[-- Attachment #1: Type: text/plain, Size: 355 bytes --]

On Mon, Sep 28, 2020 at 01:06:47PM +0200, Wolfram Sang wrote:
> Mention that new CMDs will be NACKed while the old one is still
> on-going, that the I2C address parameter of READ_BYTES is 7 bit only,
> and reword one paragraph to be more precise.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Applied to for-next, thanks!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2020-10-05 20:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-28 11:06 [PATCH] i2c: testunit: improve documentation Wolfram Sang
2020-10-05 20:56 ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).