On Fri, May 03, 2019 at 03:24:06PM -0500, Eric Blake wrote: > On 5/3/19 2:31 PM, 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 > > > > Signed-off-by: Ernest Esene <erok...@gmail.com> > > --- > > Just an interface review: > > > +++ b/qapi/char.json > > @@ -240,6 +240,21 @@ > > 'data': { 'device': 'str' }, > > 'base': 'ChardevCommon' } > > > Missing a 'Since: 4.1' line. 4.1? Oh! I couldn't guess this number, I had to deliberately omit it. > > > +{ 'struct': 'ChardevI2c', > > + 'data': { 'device': 'str', > > + 'address': 'int16'}, > > + 'base': 'ChardevCommon'} > > 'if': 'defined(CONFIG_LINUX)' > > as part of the usage of this struct, so that introspection will only see > the struct where it can be used. > > > + > > ## > > # @ChardevSocket: > > # > > @@ -398,6 +413,7 @@ > > 'data': { 'file': 'ChardevFile', > > 'serial': 'ChardevHostdev', > > 'parallel': 'ChardevHostdev', > > + 'i2c': 'ChardevI2c', > > 'pipe': 'ChardevHostdev', > > 'socket': 'ChardevSocket', > > 'udp': 'ChardevUdp', > > > > -- > Eric Blake, Principal Software Engineer > Red Hat, Inc. +1-919-301-3226 > Virtualization: qemu.org | libvirt.org > Thanks so much for the useful review. I have applied the changes and will soon send v2 of the patch.
I hope it is OK to update the "MAINTAINERS" file this Character Devices (Linux I2C) M: Ernest Esene <erok...@gmail.com> S: Maintained F: chardev/char-i2c.c -Ernest Esene
signature.asc
Description: PGP signature