Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1880612pxk; Sun, 13 Sep 2020 20:46:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJznr4raKIFs03QQiuwBM6kf2uIr8TZLAEWMlhsvtIll4fdCSAKu5y2gCKInpRN62/vcudvS X-Received: by 2002:a05:6402:45a:: with SMTP id p26mr16118872edw.8.1600055201697; Sun, 13 Sep 2020 20:46:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600055201; cv=none; d=google.com; s=arc-20160816; b=LhDX8HpeoPCPUaDRcSZTYZTYB5tjbMpMyJfd3c+ybXUxIiYEOO8gvhX8wMTaPnpZll y0QPqllrSn1+/rwpvWTS1ON3lqQhpejRv+aNcid40lxaOCj6hRycJP/ckg9Zasx68nUq r7NZ50va/ALOSz7SvNLEoxvYJwbpr2D0LCxZPnNAv0gqYT6cjESb5vfkMiJCloofgZuH ffCTclPVWCrew2qBE79Y5pKK6OzSS0j9VmQ3ByJzNMgbSdyLSGB/2B+Wn26vh3zJL4Ni Cw9vZ8Vyqs2Oucztp9YLWPBABG7a70shKTvJOpuGYl3H/CIAgVYP4xP/1hFPQD8iMWNp isSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:ironport-sdr:ironport-sdr; bh=Nz+BvwE9KysnODM1WgHKmA50Run0OvXSGL9p745XRqw=; b=rg33z4gUv2RByFxdGxoVbFzKFCK+Ha6vhdqtIudJ/pKCNGr4s+dGDIWPzkoWu6O9C3 LPcGy0uPivwf61hFup0dTwYqdxLhQiGzKMRpp3TdrMVbBD+Od1z2AJ402Q6Kv3uAqrhI M2at7emTaAXYt0O0Q31C+BhSEUYab4/9PoiVjqzs2IbecclOe7cQMBtJxPXD6B+v7vxl iu64ugxFgwxl5IVsEosrIX7tPxb1UfvsOpICdKqRA3tB3SN59u9NPEJTdepdJvKZTnf7 fNviLXnD3CxqKWykQBa1I9Lp9Bg+lLFhkDEdJVMmU9ymLQS10B/UUhVNXHzq6ZOl3miw 8ZJg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rn4si6649469ejb.143.2020.09.13.20.46.19; Sun, 13 Sep 2020 20:46:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725983AbgINDnc (ORCPT + 99 others); Sun, 13 Sep 2020 23:43:32 -0400 Received: from mga12.intel.com ([192.55.52.136]:54548 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725973AbgINDnb (ORCPT ); Sun, 13 Sep 2020 23:43:31 -0400 IronPort-SDR: /A7Z9X7uB64Xe+pNS3qXXWLNT1cUtu37m6j7V2mHz2P6xP2MAzjCPq7KLJEst2tE/NUOMBGGnn npHGnVe5xEnQ== X-IronPort-AV: E=McAfee;i="6000,8403,9743"; a="138529071" X-IronPort-AV: E=Sophos;i="5.76,424,1592895600"; d="scan'208";a="138529071" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Sep 2020 20:43:28 -0700 IronPort-SDR: lGgbCcMEZ4sdx2FC0HRh5wiQW5m18WKxyFO3dMxM1/hhtLs19Vrgz/VTij1piExuLa8iDKFOb3 WQXBdxBkXZIg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,424,1592895600"; d="scan'208";a="330567584" Received: from unknown (HELO [10.239.154.46]) ([10.239.154.46]) by fmsmga004.fm.intel.com with ESMTP; 13 Sep 2020 20:43:24 -0700 Subject: Re: [PATCH v2] i2c: virtio: add a virtio i2c frontend driver To: Jason Wang , 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 References: From: Jie Deng Message-ID: <9b18d14b-af69-eb12-34a3-83feb124083f@intel.com> Date: Mon, 14 Sep 2020 11:43:24 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.0.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.