On 2020/11/17 16:23, Gerd Hoffmann wrote:
On Tue, Nov 17, 2020 at 02:55:14PM +0800, Jie Deng wrote:
On 2020/11/16 16:16, Paolo Bonzini wrote:
On 16/11/20 03:12, Jie Deng wrote:
Fore example, the frontend may kick the sequence "write read read
..." to the backend at a time.

The segments can be aggregated into "i2c_msg list" and sent to the
hardware at a time by the backend.

The host native drivers will finally send these segments using the
methods they support.
If so, the spec needs to specify what the backend must/should/may
aggregate into a single host-side transaction.

What my proposal does is essentially saying that the backend MUST
aggregate a write and a read segment into a single transaction if it is
sent with a single virtio-i2c request.

Paolo

This may depend on the host hardware. I can add a host feature bit to
indicate it.
That is not enough.  You also need that for the transactions.  If the
driver sends a write and a read message the device needs to know
whenever that is one or two transactions.  So if you want continue
with the i2c_msg list idea you need some way to group your messages
into transactions.
Can the "kick" be used for grouping ?  I mean when a write and a read are sent by one kick at a time, they will be treated as one transaction by default if the host
has such a feature bit.

Thanks.


Or you go with paolos idea which looks simpler to me.

take care,
   Gerd


---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-h...@lists.oasis-open.org


---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-h...@lists.oasis-open.org

Reply via email to