Re: [PATCH v8] i2c: virtio: add a virtio i2c frontend driver

2021-03-19 Thread Arnd Bergmann
On Fri, Mar 19, 2021 at 7:35 AM Viresh Kumar wrote: > > On 19-03-21, 14:29, Jie Deng wrote: > > I also see example drivers/i2c/busses/i2c-xiic.c. Some people might think > > this way is more clearer than > > > > updating each member in probe. Basically, I think it's just a matter of > > personal

Re: [PATCH v8] i2c: virtio: add a virtio i2c frontend driver

2021-03-19 Thread Jie Deng
On 2021/3/19 13:53, Viresh Kumar wrote: On 16-03-21, 18:35, Jie Deng wrote: +++ b/drivers/i2c/busses/i2c-virtio.c +static int virtio_i2c_send_reqs(struct virtqueue *vq, + struct virtio_i2c_req *reqs, + struct i2c_msg *msgs, int nr)

Re: [PATCH v8] i2c: virtio: add a virtio i2c frontend driver

2021-03-19 Thread Jie Deng
On 2021/3/19 14:35, Viresh Kumar wrote: On 19-03-21, 14:29, Jie Deng wrote: I also see example drivers/i2c/busses/i2c-xiic.c. Some people might think this way is more clearer than updating each member in probe. Basically, I think it's just a matter of personal preference which doesn't

Re: [PATCH v8] i2c: virtio: add a virtio i2c frontend driver

2021-03-19 Thread Jie Deng
On 2021/3/19 13:40, Viresh Kumar wrote: On 19-03-21, 13:31, Jie Deng wrote: On 2021/3/19 11:54, Viresh Kumar wrote: On 18-03-21, 15:52, Arnd Bergmann wrote: Allowing multiple virtio-i2c controllers in one system, and multiple i2c devices attached to each controller is clearly something that

Re: [PATCH v8] i2c: virtio: add a virtio i2c frontend driver

2021-03-18 Thread Jie Deng
On 2021/3/19 11:54, Viresh Kumar wrote: On 18-03-21, 15:52, Arnd Bergmann wrote: Allowing multiple virtio-i2c controllers in one system, and multiple i2c devices attached to each controller is clearly something that has to work. Good. I don't actually see a limitation though. Viresh, what

Re: [PATCH v8] i2c: virtio: add a virtio i2c frontend driver

2021-03-18 Thread Arnd Bergmann
On Thu, Mar 18, 2021 at 3:42 PM Enrico Weigelt, metux IT consult wrote: > > On 16.03.21 08:44, Viresh Kumar wrote: > > > FWIW, this limits this driver to support a single device ever. We > > can't bind multiple devices to this driver now. Yeah, perhaps we will > > never be required to do so, but

[PATCH v8] i2c: virtio: add a virtio i2c frontend driver

2021-03-15 Thread Jie Deng
Add an I2C bus driver for virtio para-virtualization. The controller can be emulated by the backend driver in any device model software by following the virtio protocol. The device specification can be found on https://lists.oasis-open.org/archives/virtio-comment/202101/msg8.html. By