[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9b18d14b-af69-eb12-34a3-83feb124083f@intel.com>
Date: Mon, 14 Sep 2020 11:43:24 +0800
From: Jie Deng <jie.deng@...el.com>
To: Jason Wang <jasowang@...hat.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 v2] i2c: virtio: add a virtio i2c frontend driver
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.
Powered by blists - more mailing lists