[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2] chardev/char-i2c: Implement Linux I2C charac
Re: [Qemu-devel] [PATCH v2] chardev/char-i2c: Implement Linux I2C character device
Thu, 9 May 2019 14:00:56 +0100
On Sat, May 04, 2019 at 07:11:19PM +0100, Ernest Esene wrote:
> Add support for Linux I2C character device for I2C device passthrough
> For example:
> -chardev linux-i2c,address=0x46,path=/dev/i2c-N,id=i2c-chardev
There is a mixture of "linux-i2c" and "char-i2c" names in this patch,
which I find confusing. Maybe you changed your mind while writing this
code. There are two options:
1. Call it "linux-i2c". Other host operating systems will need their
own equivalent objects.
2. Call it "char-i2c" and make all the parameters optional since they
are likely to work differently on other host operating systems.
I tend towards the second approach because I think I2C is simple enough
that a single user-visible object can work on all host operating
Please make the naming consistent in the next revision of this patch.
> Signed-off-by: Ernest Esene <address@hidden>
> * Fix errors
> * update "MAINTAINERS" file.
> MAINTAINERS | 6 ++
> chardev/Makefile.objs | 1 +
> chardev/char-i2c.c | 140
> chardev/char.c | 3 +
> include/chardev/char-i2c.h | 35 ++++++++++++
> include/chardev/char.h | 1 +
> qapi/char.json | 18 ++++++
> 7 files changed, 204 insertions(+)
> create mode 100644 chardev/char-i2c.c
> create mode 100644 include/chardev/char-i2c.h
Please update the qemu-options.texi user documentation.
Description: PGP signature