From: Jie Deng <jie.deng@intel.com>
To: Jason Wang <jasowang@redhat.com>,
linux-i2c@vger.kernel.org,
virtualization@lists.linux-foundation.org,
linux-kernel@vger.kernel.org
Cc: Sergey.Semin@baikalelectronics.ru, bjorn.andersson@linaro.org,
loic.poulain@linaro.org, yu1.wang@intel.com, mst@redhat.com,
krzk@kernel.org, tali.perry1@gmail.com, wsa@kernel.org,
wsa+renesas@sang-engineering.com, jarkko.nikula@linux.intel.com,
rppt@kernel.org, shuo.a.liu@intel.com,
andriy.shevchenko@linux.intel.com, conghui.chen@intel.com,
jdelvare@suse.de
Subject: Re: [PATCH] i2c: virtio: add a virtio i2c frontend driver
Date: Tue, 8 Sep 2020 09:40:43 +0800 [thread overview]
Message-ID: <c9be298b-c51b-f7f3-994b-b7bd9ae53b99@intel.com> (raw)
In-Reply-To: <3dc0d61c-9345-2b61-828c-89ca96555e5e@redhat.com>
[-- Attachment #1.1: Type: text/plain, Size: 875 bytes --]
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.
>
[-- Attachment #1.2: Type: text/html, Size: 1945 bytes --]
[-- Attachment #2: Type: text/plain, Size: 183 bytes --]
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
next prev parent reply other threads:[~2020-09-08 1:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-03 5:34 [PATCH] i2c: virtio: add a virtio i2c frontend driver Jie Deng
2020-09-03 6:12 ` Jason Wang
2020-09-03 7:19 ` Jie Deng
2020-09-04 3:38 ` Jason Wang
2020-09-03 9:58 ` Michael S. Tsirkin
2020-09-04 5:28 ` Jie Deng
2020-09-03 10:20 ` Andy Shevchenko
2020-09-04 6:08 ` Jie Deng
2020-09-04 4:06 ` Jason Wang
2020-09-04 13:21 ` Jie Deng
2020-09-07 5:40 ` Jason Wang
2020-09-08 1:40 ` Jie Deng [this message]
2020-09-09 8:54 ` Jason Wang
2020-09-09 9:02 ` Jason Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c9be298b-c51b-f7f3-994b-b7bd9ae53b99@intel.com \
--to=jie.deng@intel.com \
--cc=Sergey.Semin@baikalelectronics.ru \
--cc=andriy.shevchenko@linux.intel.com \
--cc=bjorn.andersson@linaro.org \
--cc=conghui.chen@intel.com \
--cc=jarkko.nikula@linux.intel.com \
--cc=jasowang@redhat.com \
--cc=jdelvare@suse.de \
--cc=krzk@kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=loic.poulain@linaro.org \
--cc=mst@redhat.com \
--cc=rppt@kernel.org \
--cc=shuo.a.liu@intel.com \
--cc=tali.perry1@gmail.com \
--cc=virtualization@lists.linux-foundation.org \
--cc=wsa+renesas@sang-engineering.com \
--cc=wsa@kernel.org \
--cc=yu1.wang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox