All of lore.kernel.org
 help / color / mirror / Atom feed
From: Klaus Jensen <its@irrelevant.dk>
To: Thomas Huth <thuth@redhat.com>
Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org,
	"Klaus Jensen" <k.jensen@samsung.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Joel Stanley" <joel@jms.id.au>,
	"Andrew Jeffery" <andrew@aj.id.au>,
	"Cédric Le Goater" <clg@kaod.org>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: Re: [PATCH v2 03/11] hw/misc: add a toy i2c echo device
Date: Wed, 23 Aug 2023 09:14:49 +0200	[thread overview]
Message-ID: <ZOWx6ZovM4Z-eKDX@cormorant.local> (raw)
In-Reply-To: <ad8588fd-7839-2fdc-45c7-bb2b5917ea65@redhat.com>

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

On Aug 22 19:20, Thomas Huth wrote:
> On 01/03/2023 17.56, Cédric Le Goater wrote:
> > From: Klaus Jensen <k.jensen@samsung.com>
> > 
> > Add an example I2C device to demonstrate how a slave may master the bus
> > and send data asynchronously to another slave.
> > 
> > The device will echo whatever it is sent to the device identified by the
> > first byte received.
> > 
> > Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
> > [ clg: integrated fixes :
> >    https://lore.kernel.org/qemu-devel/Y3yMKAhOkYGtnkOp@cormorant.local/ ]
> > Message-Id: <20220601210831.67259-7-its@irrelevant.dk>
> > Signed-off-by: Cédric Le Goater <clg@kaod.org>
> > ---
> >   hw/misc/i2c-echo.c  | 156 ++++++++++++++++++++++++++++++++++++++++++++
> >   hw/misc/meson.build |   2 +
> >   2 files changed, 158 insertions(+)
> >   create mode 100644 hw/misc/i2c-echo.c
> > 
> > diff --git a/hw/misc/i2c-echo.c b/hw/misc/i2c-echo.c
> > new file mode 100644
> > index 0000000000..5705ab5d73
> > --- /dev/null
> > +++ b/hw/misc/i2c-echo.c
> > @@ -0,0 +1,156 @@
> > +#include "qemu/osdep.h"
> > +#include "qemu/timer.h"
> > +#include "qemu/main-loop.h"
> > +#include "block/aio.h"
> > +#include "hw/i2c/i2c.h"
> 
>  Hi Klaus,
> 
> I've got two questions with regards to this new devices:
> 
> 1) The file lacks a license statement (and a short comment at the beginning
> what it is all about). Could you maybe provide a follow up patch with a
> proper header comment that includes a license and a short description about
> the device?
> 
> 2) Why is it in hw/misc/ and not in hw/i2c/ ?
> 
> I think we should also have a proper Kconfig switch for this device, so we
> can disable it with --without-default-devices, what do you think?
> 
>  Thomas
> 
> 

Hi Thomas,

1) My apologies, I'll add the proper GPL license comment.

2) It's an example of using the asynchronous i2c send API. It's not a
"real" device, its more like the edu-device. A proper note in the file
should make this clear.

I'll send a patch to fix this up!


Thanks,
Klaus

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

  reply	other threads:[~2023-08-23  7:15 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-01 16:56 [PATCH v2 00/11] aspeed queue Cédric Le Goater
2023-03-01 16:56 ` [PATCH v2 01/11] readline: fix hmp completion issue Cédric Le Goater
2023-03-01 16:56 ` [PATCH v2 02/11] hw/i2c: only schedule pending master when bus is idle Cédric Le Goater
2023-03-01 16:56 ` [PATCH v2 03/11] hw/misc: add a toy i2c echo device Cédric Le Goater
2023-08-22 17:20   ` Thomas Huth
2023-08-23  7:14     ` Klaus Jensen [this message]
2023-03-01 16:56 ` [PATCH v2 04/11] tests/avocado/machine_aspeed.py: Add an I2C slave test Cédric Le Goater
2023-03-01 17:44   ` Philippe Mathieu-Daudé
2023-03-01 16:56 ` [PATCH v2 05/11] hw/arm/aspeed: Adding new machine Yosemitev2 in QEMU Cédric Le Goater
2023-03-01 16:56 ` [PATCH v2 06/11] hw/arm/aspeed: Adding new machine Tiogapass " Cédric Le Goater
2023-03-01 16:56 ` [PATCH v2 07/11] hw/at24c : modify at24c to support 1 byte address mode Cédric Le Goater
2023-03-01 16:56 ` [PATCH v2 08/11] aspeed/fuji : correct the eeprom size Cédric Le Goater
2023-03-01 16:56 ` [PATCH v2 09/11] aspeed: Introduce a spi_boot region under the SoC Cédric Le Goater
2023-03-01 17:52   ` Philippe Mathieu-Daudé
2023-03-02  9:02     ` Cédric Le Goater
2023-03-01 16:56 ` [PATCH v2 10/11] aspeed: Add a boot_rom overlap region in the SoC spi_boot container Cédric Le Goater
2023-03-01 16:56 ` [PATCH v2 11/11] aspeed/smc: Replace SysBus IRQs with GPIO lines Cédric Le Goater

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=ZOWx6ZovM4Z-eKDX@cormorant.local \
    --to=its@irrelevant.dk \
    --cc=andrew@aj.id.au \
    --cc=clg@kaod.org \
    --cc=joel@jms.id.au \
    --cc=k.jensen@samsung.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /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.