From: Jie Deng <jie.deng@intel.com>
To: "Michael S. Tsirkin" <mst@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>
Cc: virtio-comment@lists.oasis-open.org,
virtio-dev@lists.oasis-open.org, cohuck@redhat.com,
wsa+renesas@sang-engineering.com,
andriy.shevchenko@linux.intel.com, yu1.wang@intel.com,
conghui.chen@intel.com, shuo.a.liu@intel.com
Subject: Re: [virtio-comment] [PATCH v4] virtio-i2c: add the device specification
Date: Fri, 13 Nov 2020 10:39:10 +0800 [thread overview]
Message-ID: <c5d080c1-5dcf-cc80-681c-5dae34797e9e@intel.com> (raw)
In-Reply-To: <20201112035331-mutt-send-email-mst@kernel.org>
On 2020/11/12 16:54, Michael S. Tsirkin wrote:
> On Thu, Nov 12, 2020 at 09:51:17AM +0800, Jie Deng wrote:
>> On 2020/11/10 18:59, Paolo Bonzini wrote:
>>> On 10/11/20 11:33, Michael S. Tsirkin wrote:
>>>>> Sorry I didn't reply last week, but I really would prefer if virtio-i2c
>>>>> supported write-read transactions.
>>>> And I think an easier way is to allow multi-segment transactions
>>>> probably using the stop flag.
>>> You cannot always be sure that the host would support them (with the
>>> exception of write+read transactions, which are pretty much universal),
>>> so you would also need to describe what the host features are.
>>>
>>> Paolo
>>>
>> Then I will send v5 to support write+read transactions using Paolo's
>> proposal.
>> I think we may have a simple version merged first and then improve it
>> according
>> to the actual needs.
>>
>> Thank you.
> I frankly don't get it, you put read/write flags there even though they
> are not needed, saying it's intended to mirror Linux, then don't want to
> put STOP there even though this is exactly what Linux has ...
Personally, I intended to mirror the Linux "i2c_msg" to have following
interface.
struct virtio_i2c_req {
le16 addr;
le16 flags;
le16 len;
u8 buf[];
u8 status;
};
I intended to implement the standard rules for I2C transactions
(no I2C_FUNC_PROTOCOL_MANGLING) for the first step. So in the
v1~v3 only the "I2C_M_RD" was used and other bits of the flags were
reserved.
(I2C_M_STOP requires I2C_FUNC_PROTOCOL_MANGLING).
For me, I intend to mirror the "i2c_msg" from the Linux completely.
I learned about Michael also intends to keep above interface but want to
remove some unnecessary bit (e.g. I2C_M_RD) from the flags (Correct me
if not right).
Paolo prefers following interface without flags.
struct virtio_i2c_req {
le16 addr;
le16 written;
le16 read;
u8 bufwrite[];
u8 status;
u8 bufread[];
};
So Michael and Paolo, I hope we can agree on the interface first.
Any suggestions ?
Thanks.
This publicly archived list offers a means to provide input to the
OASIS Virtual I/O Device (VIRTIO) TC.
In order to verify user consent to the Feedback License terms and
to minimize spam in the list archive, subscription is required
before posting.
Subscribe: virtio-comment-subscribe@lists.oasis-open.org
Unsubscribe: virtio-comment-unsubscribe@lists.oasis-open.org
List help: virtio-comment-help@lists.oasis-open.org
List archive: https://lists.oasis-open.org/archives/virtio-comment/
Feedback License: https://www.oasis-open.org/who/ipr/feedback_license.pdf
List Guidelines: https://www.oasis-open.org/policies-guidelines/mailing-lists
Committee: https://www.oasis-open.org/committees/virtio/
Join OASIS: https://www.oasis-open.org/join/
next prev parent reply other threads:[~2020-11-13 2:39 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-10 7:31 [virtio-comment] [PATCH v4] virtio-i2c: add the device specification Jie Deng
2020-11-10 8:05 ` Paolo Bonzini
2020-11-10 10:33 ` Michael S. Tsirkin
2020-11-10 10:59 ` Paolo Bonzini
2020-11-12 1:51 ` Jie Deng
2020-11-12 8:54 ` Michael S. Tsirkin
2020-11-13 2:39 ` Jie Deng [this message]
2020-11-16 2:12 ` Jie Deng
2020-11-16 8:16 ` Paolo Bonzini
2020-11-17 6:55 ` Jie Deng
2020-11-17 8:23 ` Gerd Hoffmann
2020-11-17 15:59 ` Paolo Bonzini
2020-11-18 1:24 ` Jie Deng
2020-11-18 2:06 ` [virtio-comment] Re: [virtio-dev] " Jie Deng
2020-11-18 8:22 ` Paolo Bonzini
2020-11-19 1:41 ` Jie Deng
2020-11-19 15:55 ` Paolo Bonzini
2020-11-20 1:36 ` Jie Deng
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=c5d080c1-5dcf-cc80-681c-5dae34797e9e@intel.com \
--to=jie.deng@intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=cohuck@redhat.com \
--cc=conghui.chen@intel.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=shuo.a.liu@intel.com \
--cc=virtio-comment@lists.oasis-open.org \
--cc=virtio-dev@lists.oasis-open.org \
--cc=wsa+renesas@sang-engineering.com \
--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