Linux-Renesas-SoC Archive on
 help / color / Atom feed
From: Wolfram Sang <>
To: "" <>,
Subject: Re: [PATCH RFC 0/1] i2c: add slave testunit driver
Date: Wed, 1 Jul 2020 10:57:22 +0200
Message-ID: <20200701085722.GB2261@ninjato> (raw)
In-Reply-To: <>

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

> Very good idea to use a slave to send the Host-Notify command to the host
> for testing. Later on, for SMBus-Alert, a GPIO can be used to loop it back
> to the tested master to verify that SMBus-Alert is working fine.

Glad you like it! Yes, SMBusAlert is the next addition planned.

> What you implemented is the "remote" side which I understood is meant to
> replace a "real" device for those features which are not that common.


> Shouldn't we also have the "master" side loopback test driver as well to
> work with this test slave driver ?

Yes, ultimately we want that. But for this first draft, I simply
triggered with 'i2cset' and checked debug prints plus debugfs for
desired outcome.

> For example for the Host-Notify that master side loopback test driver would
> perform the request_irq allowing it to be called back when the slave test
> driver sends the host-notify command.
> In case of SMBus-Alert, that would be implementing the .alert function that
> would be called when the SMBus-Alert is received ..

Exactly. I am simply focussed on the remote side for now because I am
curious if it works at all. And what other parts need fixing, e.g. the
I2C core patch I sent a few minutes ago.

> With that the whole loop can be automatically tested. This kind of stuff
> can of course be enhanced to a LOT of cases .... basically something similar
> to spi-loopback driver for example except that in case of i2c it needs 2
> I2C controllers instead of one for the SPI.

This is my ultimate goal, too: scriptable tests for I2C mastes. Basic
functionality can be tested with a simple device, say an EEPROM. But the
rare stuff needs something like this testunit.

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

      reply index

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-29 18:53 Wolfram Sang
2020-06-29 18:53 ` [PATCH RFC 1/1] " Wolfram Sang
2020-07-01  8:30 ` [PATCH RFC 0/1] " Alain Volmat
2020-07-01  8:57   ` Wolfram Sang [this message]

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200701085722.GB2261@ninjato \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-Renesas-SoC Archive on

Archives are clonable:
	git clone --mirror linux-renesas-soc/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-renesas-soc linux-renesas-soc/ \
	public-inbox-index linux-renesas-soc

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone