linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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: mst@redhat.com, wsa+renesas@sang-engineering.com, wsa@kernel.org,
	andriy.shevchenko@linux.intel.com, jarkko.nikula@linux.intel.com,
	jdelvare@suse.de, Sergey.Semin@baikalelectronics.ru,
	krzk@kernel.org, rppt@kernel.org, loic.poulain@linaro.org,
	tali.perry1@gmail.com, bjorn.andersson@linaro.org,
	shuo.a.liu@intel.com, conghui.chen@intel.com, yu1.wang@intel.com
Subject: Re: [PATCH v2] i2c: virtio: add a virtio i2c frontend driver
Date: Mon, 14 Sep 2020 11:43:24 +0800	[thread overview]
Message-ID: <9b18d14b-af69-eb12-34a3-83feb124083f@intel.com> (raw)
In-Reply-To: <ce6b55d9-dfda-4387-0e04-0d50437355f0@redhat.com>


On 2020/9/14 10:46, Jason Wang wrote:
>
>> +
>> +#define VIRTIO_I2C_MSG_OK    0
>> +#define VIRTIO_I2C_MSG_ERR    1
>> +
>> +/**
>> + * struct virtio_i2c_hdr - the virtio I2C message header structure
>> + * @addr: i2c_msg addr, the slave address
>> + * @flags: i2c_msg flags
>> + * @len: i2c_msg len
>> + */
>> +struct virtio_i2c_hdr {
>> +    __le16 addr;
>> +    __le16 flags;
>> +    __le16 len;
>> +};
>
>
> As said in v1, this should belong to uapi.
>
That's right. I missed this.
I will move these things to uapi. Thanks.


>
>> +
>> +/**
>> + * struct virtio_i2c_msg - the virtio I2C message structure
>> + * @hdr: the virtio I2C message header
>> + * @buf: virtio I2C message data buffer
>> + * @status: the processing result from the backend
>> + */
>> +struct virtio_i2c_msg {
>> +    struct virtio_i2c_hdr hdr;
>> +    u8 *buf;
>> +    u8 status;
>> +};
>
>
> I'm not quite sure this is the best layout.
>
> E.g virtio scsi differ in buffer out of out one:
>
> structvirtio_scsi_req_cmd{
> ...
> u8 dataout[];
> ...
> u8 datain[];
>
> }
>
> And I would like to have a look at the spec patch.
>
> Thanks
>
Sure. I will send the v3 along with the spec patch.
Thanks.



  reply	other threads:[~2020-09-14  3:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-11  3:48 [PATCH v2] i2c: virtio: add a virtio i2c frontend driver Jie Deng
2020-09-11  3:53 ` Randy Dunlap
2020-09-14  1:16   ` Jie Deng
2020-09-14  2:46 ` Jason Wang
2020-09-14  3:43   ` Jie Deng [this message]
2020-09-14 14:48 ` Dan Carpenter
     [not found]   ` <20200914152455.GI3956970@smile.fi.intel.com>
2020-09-14 15:47     ` Dan Carpenter
2020-09-14 16:08       ` Andy Shevchenko

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=9b18d14b-af69-eb12-34a3-83feb124083f@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;
as well as URLs for NNTP newsgroup(s).