[<prev] [next>] [day] [month] [year] [list]
Date: Wed, 9 Sep 2020 16:54:36 +0800
From: Jason Wang <jasowang@...hat.com>
To: Jie Deng <jie.deng@...el.com>, linux-i2c@...r.kernel.org,
virtualization@...ts.linux-foundation.org,
linux-kernel@...r.kernel.org
Cc: mst@...hat.com, wsa+renesas@...g-engineering.com, wsa@...nel.org,
andriy.shevchenko@...ux.intel.com, jarkko.nikula@...ux.intel.com,
jdelvare@...e.de, Sergey.Semin@...kalelectronics.ru,
krzk@...nel.org, rppt@...nel.org, loic.poulain@...aro.org,
tali.perry1@...il.com, bjorn.andersson@...aro.org,
shuo.a.liu@...el.com, conghui.chen@...el.com, yu1.wang@...el.com
Subject: Re: [PATCH] i2c: virtio: add a virtio i2c frontend driver
On 2020/9/8 上午9:40, Jie Deng wrote:
>
>
> On 2020/9/7 13:40, Jason Wang wrote:
>>
>>>
>>>
>>>>
>>>>>
>>>>> +struct virtio_i2c_msg {
>>>>> + struct virtio_i2c_hdr hdr;
>>>>> + char *buf;
>>>>> + u8 status;
>>>>
>>>>
>>>> Any reason for separating status out of virtio_i2c_hdr?
>>>>
>>> The status is not from i2c_msg.
>>
>>
>> You meant ic2_hdr? You embed status in virtio_i2c_msg anyway.
>>
>>
> The "i2c_msg" structure defined in i2c.h.
>
>>> So I put it out of virtio_i2c_hdr.
>>
>>
>> Something like status or response is pretty common in virtio request
>> (e.g net or scsi), if no special reason, it's better to keep it in
>> the hdr.
>>
> Mainly based on IN or OUT.
>
> The addr, flags and len are from "i2c_msg". They are put in one
> structure as an OUT**scatterlist.
> The buf can be an OUT**or an IN scatterlist depending on write or read.
> The status is a result from the backend which is defined as an IN
> scatterlis.
Ok. I get this.
Thanks
Powered by blists - more mailing lists