Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3853798pxv; Tue, 13 Jul 2021 05:28:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1ggLkTUKrv6Knw5c8Xx3AjXI8PE+XjK/7jiL4Fus0aysWzoTcZNs7ORUXjBsnJWANxnZU X-Received: by 2002:a05:6402:2034:: with SMTP id ay20mr5642750edb.188.1626179322810; Tue, 13 Jul 2021 05:28:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626179322; cv=none; d=google.com; s=arc-20160816; b=iCLWXMzFMIp9zpkJqYHbShiw1177H9HE5sUmBnvso5vaxDvuX1mx2BdT3TLB9Novtk BgK0ILFvIDFW75GcxUePnrPGKhN6gHBOpqSb4GQhwDipSN3TeXa4CIuwcDPJOoQ2WiMo PcPqDDnKrD4+Ln50MYHRiuTXeOy8YyNTL4HFvyF+FEd2jvfGnEY8GID8ArfGW7iwWSLY Uu48lrqHIvpk8q1/rVYIp2c31qCS7zQprs22Xmq+B8J6lQ/u91lC4LQzplRXinaTh4T2 nP/FnO54dRqk92ADKI5uzQRijq7z5F+p1erGF0vdp0fnezxsu89uKIWh5G62Rc0bp73E POzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=v6t6smNnWmI1a6LrnxlRsjTevwrrqpwQ4vEBS3e8RGI=; b=i8G0BHC7st3RPb43aado1oNK3v2MxUVIYNxjnoUs33VimNMlpT19/OuHDPJ7xXVNPe ZomjAT/mjZBEP+ElPIDswMKcXBg4UVk6jSLS4ey5SMxKC5/ctjE6yMLakG+c3WGxaMEt aykJ8qOsQpLd3/aT6HNvuI0NMXAOXv5APFVbIG3CPwIdA/3aOmAKBCr9fkGKZFjPA/sP rs97CmspeLNGEcKKrFkcPx6mXwegKuYpz+eLiObROmhEZuofliiBiyPizmMCDrM1nsD9 4wFdP6+Q5NuwNuUqRSUBtmgAMzf8genFuTYslwsfCErMtBrOeUN1APA847/7lcV5Mvjq DpjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pn2YhGER; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i5si3147903eds.44.2021.07.13.05.28.18; Tue, 13 Jul 2021 05:28:42 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pn2YhGER; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236098AbhGMM3p (ORCPT + 99 others); Tue, 13 Jul 2021 08:29:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:59756 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236042AbhGMM3p (ORCPT ); Tue, 13 Jul 2021 08:29:45 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9F95961288; Tue, 13 Jul 2021 12:26:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626179215; bh=3a5/3YrF7WmM3W+mRfP+oYr4maXcyyH49woP0O8Bt7g=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=pn2YhGERo5SB2Jvr64haBX4pNjs4Bh6XB5WgW+INarvCMZTT32150XYsKUL6REiBy 4Jixff7ij6cG691CggEy2uVXBHOHAjlbVZUBQ4F0k1fAS/9bDEzTg5KvLNdY9iNlCm rmHutJs82IUtA7ccuz6tI44WKaEQ4PFV7yaULdEAN6jhv7+xCJh0QB4HANmuzcnX9i CTR75Gz82Vwmm/7PVMS3888neO6pxd9eDHgcS3zi3xi/9c2bZCOCZ6jO+5MJu4hLeh jKdAzBe7TY6QcLnXPy3zzcXmsujYmTbMayae6lDHxXEtHPf4q5lPEGqgN9RaCbHQLS 63B3odrEDLyUQ== Received: by mail-wr1-f53.google.com with SMTP id d12so29601075wre.13; Tue, 13 Jul 2021 05:26:55 -0700 (PDT) X-Gm-Message-State: AOAM5328YzKVghIzVNRbvoBmvUqqkusYd6/Zp5GCFfAX61EFtzaGoPWs 4r+vpifOmVi9z1ialXUq16K+qmvFlqVu1beexPs= X-Received: by 2002:a5d:438c:: with SMTP id i12mr5395595wrq.99.1626179214184; Tue, 13 Jul 2021 05:26:54 -0700 (PDT) MIME-Version: 1.0 References: <26ba6941fa01eee88c99ecdd611d235c22bd6e3c.1626173013.git.viresh.kumar@linaro.org> In-Reply-To: <26ba6941fa01eee88c99ecdd611d235c22bd6e3c.1626173013.git.viresh.kumar@linaro.org> From: Arnd Bergmann Date: Tue, 13 Jul 2021 14:26:38 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/5] virtio_mmio: Bind virtio device to device-tree node To: Viresh Kumar Cc: Jason Wang , "Michael S. Tsirkin" , Rob Herring , Jean-Philippe Brucker , Vincent Guittot , Bill Mills , =?UTF-8?B?QWxleCBCZW5uw6ll?= , "Enrico Weigelt, metux IT consult" , Jie Deng , DTML , Linux Kernel Mailing List , virtualization@lists.linux-foundation.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 13, 2021 at 12:51 PM Viresh Kumar wrote: > > Bind the virtio device with its device protocol's sub-node. This will > help users of the virtio device to mention their dependencies on the > device in the DT file itself. Like GPIO pin users can use the phandle of > the device node, or the node may contain more subnodes to add i2c or spi > eeproms and other users. > > Signed-off-by: Viresh Kumar > --- > drivers/virtio/virtio_mmio.c | 44 ++++++++++++++++++++++++++++++++++++ > 1 file changed, 44 insertions(+) Hi Viresh, I don't see anything in this patch that is specific to virtio-mmio, as opposed to virtio-pci. It would be better to move this into the virtio core code so it can be called independently of the transport that is used for virtio. The PCI code has similar code that will set vdev->dev.parent->of_node for a virtio-pci device, as long as that node is present. Arnd