OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

virtio-dev message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [virtio-comment] [PATCH v3] virtio-i2c: add the device specification

On 2020/10/29 4:10, Paolo Bonzini wrote:
On 27/10/20 07:00, Jie Deng wrote:
+The driver queues requests to the virtqueue, and they are used by the
+device. The request is the representation of one segment of an I2C
+transaction. Each request is of form:
+struct virtio_i2c_req {
+        le16 addr;
+        le16 flags;
+        le16 len;
+        u8 buf[];
+        u8 status;

one extremely common two-segment I2C transaction is not reproducible
with virtio-i2c.  This is when a write is followed by a read: the master
starts off the transmission with a write, then sends a second START,
then continues with a read from the same address.

Would it make sense to define the request like

struct virtio_i2c_req {
	le16 addr;
	le16 written;
	le16 read;
	u8 bufwrite[];
	u8 status;
	u8 bufread[];





Do you have any comments on Paolo's proposal ?


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]