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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 16418C11F65 for ; Wed, 30 Jun 2021 08:32:23 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 952C761CC6 for ; Wed, 30 Jun 2021 08:32:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 952C761CC6 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arndb.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=virtualization-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 50047606A3; Wed, 30 Jun 2021 08:32:22 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1DSeOSSUcFvc; Wed, 30 Jun 2021 08:32:21 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp3.osuosl.org (Postfix) with ESMTPS id 03D8560666; Wed, 30 Jun 2021 08:32:21 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id AA007C001A; Wed, 30 Jun 2021 08:32:20 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 23DF1C000E for ; Wed, 30 Jun 2021 08:32:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id EFEE4403AA for ; Wed, 30 Jun 2021 08:32:18 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5ygMHgVG9Ll2 for ; Wed, 30 Jun 2021 08:32:17 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0 Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.74]) by smtp2.osuosl.org (Postfix) with ESMTPS id 4721340184 for ; Wed, 30 Jun 2021 08:32:16 +0000 (UTC) Received: from mail-wr1-f48.google.com ([209.85.221.48]) by mrelayeu.kundenserver.de (mreue107 [213.165.67.113]) with ESMTPSA (Nemesis) id 1MGA0o-1lzZyt0lAK-00GbiG for ; Wed, 30 Jun 2021 10:32:15 +0200 Received: by mail-wr1-f48.google.com with SMTP id i94so2559168wri.4 for ; Wed, 30 Jun 2021 01:32:15 -0700 (PDT) X-Gm-Message-State: AOAM532VT+XYJMc1/+h8XiiVOzZQ3QWcmKnjzf1gtvUIgHpLyvEHQdzG /t4F7dqQVcM7wnGdFqQ6GjoMTeuRFTF7JgRGPy0= X-Google-Smtp-Source: ABdhPJy+MGLGtZBULVT9Dq0Wsw+8kotCQEn+TV7Gj+Esc9Dq1TbrZjPLHyuAOFtqReu5JqSeSkHTDFb+c6zwiG1Jzss= X-Received: by 2002:adf:fd8e:: with SMTP id d14mr18081260wrr.361.1625041934904; Wed, 30 Jun 2021 01:32:14 -0700 (PDT) MIME-Version: 1.0 References: <226a8d5663b7bb6f5d06ede7701eedb18d1bafa1.1616493817.git.jie.deng@intel.com> <05cc9484-f97b-0533-64fe-ff917c6b87ee@intel.com> <3016ab8b-cbff-1309-6a1f-080703a4130f@intel.com> In-Reply-To: From: Arnd Bergmann Date: Wed, 30 Jun 2021 10:29:40 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v10] i2c: virtio: add a virtio i2c frontend driver To: Andy Shevchenko X-Provags-ID: V03:K1:JwQ3ZcywDnUifWDgjNRbz2Qvf82YeUzrrIY2zF1L4eT4FVXijPY zk9cDlMVPB1fwUQLxIeNTPN9fYyymZP6qhp11FH82z8d0vFRigKeKmXoCoqkPKTHwkNOp7/ pXQsg7wTUkX8gVlagSusFlcMS0DXsDyHO42pqvy4EMKN7pUyISG2I6ejIKcZhX3hiNFdqTq h0G7p/nICHAkBFOjOFYUg== X-UI-Out-Filterresults: notjunk:1;V03:K0:0gsdDKw2CoI=:ChyhAuSOyMT6HuMlZLxirZ +ZXytU1Mr4D1xSqjrfxIHAkHoJH8RER1/+xAv4fAaQ8mbvz30uzcEaPRodCrb19NqSnhNmcW0 tlyQVLuxSaR4pV7BEy61/NMZ4fg/s0IdZv3OWTuG/6NkIgnvPJlenTVAa3W+RK3SQYpkOqjtE ctBkvEy78B6WBjrKUP+jrutTkVPFEp0FnVDzERTIZfDvZSVbSVVTOYXRQQUSapWv9yeuBqqne H1clMR/FxuXIpv7AqxgSq2tjiQ+GytQqt8ZztVTynr/c8yIbY66MS8P7JYfuhJ8ickw6LPFUd aEHYmOadmWOFtZA5AGwk8mnWLTd5tAsFrzz9+xhbe23o9eZCXkmmaW+2zM5ohvgiKhsDVIkN5 35AWTLwY+1yPH9ebyXjrDHYuPZVKy6WudseBCUC37qirsgWnFj12GhTQF8wqoQ8udZWidyjrd zP8v6RiRZRAyQix3zbbFUilWUXLc4zl97C89xKrWcexWC+F4vTDr+5vqsNfFbfwBbclGfnn7s Lqkx7SynSRudduYfK8BquJRO1QY3oF0S16wa3O52Dx5qLGVx/hiyha85+348ndegyhkpitiNl KN3kYKPwQOrL7zp/mCn8gxQDesTjWVNoxUdEChSDGq6etOoaULkcJTEzM/Jxg9fgRwMmPaFdw 4uqw= Cc: Sergey Semin , Bjorn Andersson , loic.poulain@linaro.org, "Michael S. Tsirkin" , Viresh Kumar , shuo.a.liu@intel.com, Linux Kernel Mailing List , virtualization@lists.linux-foundation.org, Wolfram Sang , Paolo Bonzini , jarkko.nikula@linux.intel.com, Linux I2C , Stefan Hajnoczi , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , kblaiech@mellanox.com, Tali Perry , conghui.chen@intel.com, Mike Rapoport , yu1.wang@intel.com X-BeenThere: virtualization@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux virtualization List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: virtualization-bounces@lists.linux-foundation.org Sender: "Virtualization" On Wed, Jun 30, 2021 at 10:09 AM Andy Shevchenko wrote: > > On Wed, Jun 30, 2021 at 09:55:49AM +0200, Arnd Bergmann wrote: > > On Wed, Jun 30, 2021 at 9:51 AM Jie Deng wrote: > > ... > > > On a related note, we are apparently still missing the bit in the virtio bus > > layer that fills in the dev->of_node pointer of the virtio device. Without > > this, it is not actually possible to automatically probe i2c devices connected > > to a virtio-i2c bus. The same problem came up again with the virtio-gpio > > driver that suffers from the same issue. > > Don't we need to take care about fwnode handle as well? I'm fairly sure this gets set up automatically on DT based systems, based on the dev->of_node of the virtio device, with no changes to the i2c core core. If you want to automatically probe i2c devices on a virtio-i2c controller with ACPI, I have no idea if that would require changes to both i2c-core-acpi.c as well as the virtio core, or just one of them. So far, my assumption was that this would not be needed with ACPI. Arnd _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization 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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 1647AC11F65 for ; Wed, 30 Jun 2021 08:32:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EE1AE61D06 for ; Wed, 30 Jun 2021 08:32:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233381AbhF3Ieq (ORCPT ); Wed, 30 Jun 2021 04:34:46 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:35561 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233005AbhF3Iep (ORCPT ); Wed, 30 Jun 2021 04:34:45 -0400 Received: from mail-wr1-f50.google.com ([209.85.221.50]) by mrelayeu.kundenserver.de (mreue010 [213.165.67.97]) with ESMTPSA (Nemesis) id 1Mj8a5-1lKEsU1GI1-00fCAA; Wed, 30 Jun 2021 10:32:15 +0200 Received: by mail-wr1-f50.google.com with SMTP id u8so2526305wrq.8; Wed, 30 Jun 2021 01:32:15 -0700 (PDT) X-Gm-Message-State: AOAM531sGk/R+iOy4rJ/+iSVTKi7839hsPnWUam5O1V18yW4F02z+0AU pEGaz6MRO6PLwuaTwyPYxiU5fFZweyzcpcK1CDE= X-Google-Smtp-Source: ABdhPJy+MGLGtZBULVT9Dq0Wsw+8kotCQEn+TV7Gj+Esc9Dq1TbrZjPLHyuAOFtqReu5JqSeSkHTDFb+c6zwiG1Jzss= X-Received: by 2002:adf:fd8e:: with SMTP id d14mr18081260wrr.361.1625041934904; Wed, 30 Jun 2021 01:32:14 -0700 (PDT) MIME-Version: 1.0 References: <226a8d5663b7bb6f5d06ede7701eedb18d1bafa1.1616493817.git.jie.deng@intel.com> <05cc9484-f97b-0533-64fe-ff917c6b87ee@intel.com> <3016ab8b-cbff-1309-6a1f-080703a4130f@intel.com> In-Reply-To: From: Arnd Bergmann Date: Wed, 30 Jun 2021 10:29:40 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v10] i2c: virtio: add a virtio i2c frontend driver To: Andy Shevchenko Cc: Jie Deng , Wolfram Sang , Linux I2C , virtualization@lists.linux-foundation.org, Linux Kernel Mailing List , "Michael S. Tsirkin" , Jason Wang , conghui.chen@intel.com, kblaiech@mellanox.com, jarkko.nikula@linux.intel.com, Sergey Semin , Mike Rapoport , loic.poulain@linaro.org, Tali Perry , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , Bjorn Andersson , yu1.wang@intel.com, shuo.a.liu@intel.com, Viresh Kumar , Stefan Hajnoczi , Paolo Bonzini Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:0er6ohVeWS6+pgXIRAlWL5u2VryJWzbRIWzKbos8+85sZw6atpa iDBeef1gXRUGmtF8tIAZbVSarOPf8yOTVpK5WwWGzpjyjbfWrxS20P2vnz42ZC3/vFd2rEn YrXnvJrp7GcC5cWmmljxpDBwscgHk+KotU4ABEmfbD1TPFwm9r5CKc7jKTK1FRo7kJ4WOzp PlYhPCtFgCCx1XZKxmBvg== X-UI-Out-Filterresults: notjunk:1;V03:K0:NDOslyLj47s=:tTQArK5qCBola4jiXmg4h7 uY1eqwNk+HNqDNKZ9IjRYe9vquC501733dhzsnYIaFJFpXxpF40O6mnkiEJuFBSFkvsbGe9sJ MusjjJUI3Q9o5vY9jOjEe1Msee7JGBnjU0QZS7t5AO3XWRgLeXsB8gJ8RcGCIQjBZJsop0Oh5 LBZywvxacIEjB81K9IZSAaq4ALpUXCFFyypznWL2Wi1sFcih0D39DOdAF40hOjMj6V8ywWq35 C6DvB2oYlqz8pWKym33RhjYEIoUuO/kM22QlYn4Wn7XmO+L8hsaajTfR6nB7ue27tusJUR6A9 fRL9ZzbdiNddeQ3qoqG14d0B5yaYhw0uZ0TQco1v7UViWR4YlniSNegsxOKR8VnkElVEkJEC3 sPF5A9SAgrH5t0TzZYeLDYU0Uenm4WgRM/rU5erpNvnIayoLcahE661vR3ttcraRD8r201RUy /BUEV8a/pjV56MzeeJf+UYmNiseB01Abq09pJfVWIjjR2GMx61frck7II5LdJYnuVfdFg2qv+ aurJfdkRZyKYdv4w9nwRiI0BlK6zLi3SY/uIkn68al3JoGE/Qv/5OAa5+CotcTMjy+dfiwQnA pYSkVUeKde199/gxGT93Mq1YAKZYCTDqPwAgRPQzzBYCZeYDBpkIRtobbB5hb+oZVB//sgY6C CR03v6AzYCCqXlEr/VmZf5Ve+Wyl0lQK67tDDkBQ/8QQMj1vl5hpuwalN7upN0sqLIgtKLcnT PD6eZeoeL7ONBDUOtubd8jwOKtrc4aQU1cRMpeAr0OaWR3M5289eQA0PcktiDraWB5nBoGoHO MBiy2EBz/8XSc0k9wh/kj8sj8j/Tq5haWxV7Z4lbjcbA9a3KRnFB7qZxIGwfuQz9Hvcn09g7x oC0DVbh3hEiZQBe4CeBKBkS1GDkxaEkIrJ1vCTonKeJKnB1sQu22J63QuC1tEJc4lIOzE81Zo v7YXhgL9XLpa00LxSr5UHYUsFgooUWpYcS8qpe9uoIWoVRCXerrkZ Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 30, 2021 at 10:09 AM Andy Shevchenko wrote: > > On Wed, Jun 30, 2021 at 09:55:49AM +0200, Arnd Bergmann wrote: > > On Wed, Jun 30, 2021 at 9:51 AM Jie Deng wrote: > > ... > > > On a related note, we are apparently still missing the bit in the virtio bus > > layer that fills in the dev->of_node pointer of the virtio device. Without > > this, it is not actually possible to automatically probe i2c devices connected > > to a virtio-i2c bus. The same problem came up again with the virtio-gpio > > driver that suffers from the same issue. > > Don't we need to take care about fwnode handle as well? I'm fairly sure this gets set up automatically on DT based systems, based on the dev->of_node of the virtio device, with no changes to the i2c core core. If you want to automatically probe i2c devices on a virtio-i2c controller with ACPI, I have no idea if that would require changes to both i2c-core-acpi.c as well as the virtio core, or just one of them. So far, my assumption was that this would not be needed with ACPI. Arnd