From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 901E6C4338F for ; Tue, 27 Jul 2021 02:15:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6C5F560FE3 for ; Tue, 27 Jul 2021 02:15:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234439AbhG0Bez (ORCPT ); Mon, 26 Jul 2021 21:34:55 -0400 Received: from mga17.intel.com ([192.55.52.151]:48089 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233727AbhG0Bey (ORCPT ); Mon, 26 Jul 2021 21:34:54 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10057"; a="192629016" X-IronPort-AV: E=Sophos;i="5.84,272,1620716400"; d="scan'208";a="192629016" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jul 2021 19:15:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,272,1620716400"; d="scan'208";a="505286256" Received: from dengjie-mobl1.ccr.corp.intel.com (HELO [10.239.154.58]) ([10.239.154.58]) by FMSMGA003.fm.intel.com with ESMTP; 26 Jul 2021 19:15:17 -0700 Subject: Re: [PATCH v15] i2c: virtio: add a virtio i2c frontend driver To: Arnd Bergmann Cc: Linux I2C , "open list:DRM DRIVER FOR QEMU'S CIRRUS DEVICE" , Linux Kernel Mailing List , Wolfram Sang , Wolfram Sang , "Michael S. Tsirkin" , Jason Wang , Andy Shevchenko , yu1.wang@intel.com, conghui.chen@intel.com, Viresh Kumar , Stefan Hajnoczi , gregkh , Vincent Guittot , =?UTF-8?Q?Alex_Benn=c3=a9e?= , jiedeng@alumni.sjtu.edu.cn References: From: Jie Deng Message-ID: Date: Tue, 27 Jul 2021 10:15:16 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/7/23 17:03, Arnd Bergmann wrote: > On Fri, Jul 23, 2021 at 7:44 AM Jie Deng wrote: > >> + >> + ret = virtio_i2c_setup_vqs(vi); >> + if (ret) >> + return ret; >> + >> + vi->adap.owner = THIS_MODULE; >> + snprintf(vi->adap.name, sizeof(vi->adap.name), >> + "i2c_virtio at virtio bus %d", vdev->index); >> + vi->adap.algo = &virtio_algorithm; >> + vi->adap.quirks = &virtio_i2c_quirks; >> + vi->adap.dev.parent = &vdev->dev; >> + i2c_set_adapdata(&vi->adap, vi); >> + >> + /* >> + * Setup ACPI node for controlled devices which will be probed through >> + * ACPI. >> + */ >> + ACPI_COMPANION_SET(&vi->adap.dev, ACPI_COMPANION(pdev)); > Since there is now a generic way for virtio drivers to link up with OF > device nodes, maybe this should be handled the same way in the > virtio core rather than the driver? I'm currently based on the I2C tree. Has that patch been already merged ? Anyway, I think we can send an additional patch to remove this line once that "generic way" patch is merged. Regards, Jie