Re: [Qemu-devel] [PATCH v2] chardev/char-i2c: Implement Linux I2C character device

2019-05-10 Thread Ernest Esene
On Thu, May 09, 2019 at 02:00:56PM +0100, Stefan Hajnoczi wrote: > 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 i

Re: [Qemu-devel] [PATCH v2] chardev/char-i2c: Implement Linux I2C character device

2019-05-10 Thread Markus Armbruster
Ernest Esene writes: > On Tue, May 07, 2019 at 07:33:09PM +0200, Markus Armbruster wrote: >> Ernest Esene writes: >> >> > 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 >> > >> > Signed-

Re: [Qemu-devel] [PATCH v2] chardev/char-i2c: Implement Linux I2C character device

2019-05-10 Thread Ernest Esene
On Tue, May 07, 2019 at 07:33:09PM +0200, Markus Armbruster wrote: > Ernest Esene writes: > > > 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 > > > > Signed-off-by: Ernest Esene > > Could

Re: [Qemu-devel] [PATCH v2] chardev/char-i2c: Implement Linux I2C character device

2019-05-09 Thread Stefan Hajnoczi
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 c

Re: [Qemu-devel] [PATCH v2] chardev/char-i2c: Implement Linux I2C character device

2019-05-07 Thread Eric Blake
On 5/7/19 12:33 PM, Markus Armbruster wrote: >> +static int i2c_ioctl(Chardev *chr, int cmd, void *arg) >> +{ >> +FDChardev *fd_chr = FD_CHARDEV(chr); >> +QIOChannelFile *floc = QIO_CHANNEL_FILE(fd_chr->ioc_in); >> +int fd = floc->fd; >> +int addr; >> + >> +switch (cmd) { >> +

Re: [Qemu-devel] [PATCH v2] chardev/char-i2c: Implement Linux I2C character device

2019-05-07 Thread Markus Armbruster
Ernest Esene writes: > 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 > > Signed-off-by: Ernest Esene Could you explain briefly how passing through a host's I2C device can be useful? > > ---

[Qemu-devel] [PATCH v2] chardev/char-i2c: Implement Linux I2C character device

2019-05-04 Thread Ernest Esene
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 Signed-off-by: Ernest Esene --- v2: * Fix errors * update "MAINTAINERS" file. --- MAINTAINERS| 6 ++ chardev/Makefile.objs