[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <664d590d-b43f-1829-3ea0-44a4054dfca6@intel.com>
Date: Tue, 2 Mar 2021 14:28:09 +0800
From: Jie Deng <jie.deng@...el.com>
To: Viresh Kumar <viresh.kumar@...aro.org>
Cc: linux-i2c@...r.kernel.org,
virtualization@...ts.linux-foundation.org,
linux-kernel@...r.kernel.org, mst@...hat.com, wsa@...nel.org,
jasowang@...hat.com, wsa+renesas@...g-engineering.com,
andriy.shevchenko@...ux.intel.com, conghui.chen@...el.com,
arnd@...db.de, kblaiech@...lanox.com,
jarkko.nikula@...ux.intel.com, Sergey.Semin@...kalelectronics.ru,
rppt@...nel.org, loic.poulain@...aro.org, tali.perry1@...il.com,
u.kleine-koenig@...gutronix.de, bjorn.andersson@...aro.org,
yu1.wang@...el.com, shuo.a.liu@...el.com,
Paolo Bonzini <pbonzini@...hat.com>
Subject: Re: [PATCH v5] i2c: virtio: add a virtio i2c frontend driver
On 2021/3/2 11:43, Viresh Kumar wrote:
> On 02-03-21, 10:21, Jie Deng wrote:
>> On 2021/3/1 19:54, Viresh Kumar wrote:
>> That's my original proposal. I used to mirror this interface with "struct
>> i2c_msg".
>>
>> But the design philosophy of virtio TC is that VIRTIO devices are not
>> specific to Linux
>> so the specs design should avoid the limitations of the current Linux driver
>> behavior.
> Right, I understand that.
>
>> We had some discussion about this. You may check these links to learn the
>> story.
>> https://lists.oasis-open.org/archives/virtio-comment/202010/msg00016.html
>> https://lists.oasis-open.org/archives/virtio-comment/202010/msg00033.html
>> https://lists.oasis-open.org/archives/virtio-comment/202011/msg00025.html
> So the thing is that we want to support full duplex mode, right ?
>
> How will that work protocol wise ? I mean how would we know if we are
> expecting both tx and rx buffers in a transfer ?
Not for the full duplex. As Paolo explained in those links.
We defined a combined request called "write-read request"
"
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.
In theory there's no difference between one multi-segment transaction
and many single-segment transactions _in a single-master scenario_.
However, it is a plausible configuration to have multiple guests sharing
an I2C host device as if they were multiple master.
So the spec should provide a way at least to support for transactions with
1 write and 1 read segment in one request to the same address.
"
From the perspective of specification design, it hopes to provide more
choices
while from the perspective of specific implementation, we can choose
what we need
as long as it does not violate the specification.
Since the current Linux driver doesn't use this mechanism. I'm
considering to move
the "struct virtio_i2c_req" into the driver and use one "buf" instead.
Powered by blists - more mailing lists