Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp415265ybf; Fri, 28 Feb 2020 00:13:40 -0800 (PST) X-Google-Smtp-Source: APXvYqxjidZaI6TKOvYowVDCZdSMIALdWD7bGRO5n+Bo9wNwnQb9A2T+lQ/0MxUICFVZ0+iAN5xC X-Received: by 2002:aca:3189:: with SMTP id x131mr2331865oix.33.1582877620314; Fri, 28 Feb 2020 00:13:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582877620; cv=none; d=google.com; s=arc-20160816; b=u9m6Blsd4CdB3Zms9KBE2S9G9PHOr9OYE6Fbd2Q5CNgnEkNS2AyS1zVz/8rzqKPT6q V2OT4XEm8jST78NBxysW7/WZTsZGthT41s6Wn/GgBkLfQouziYOAzquJyWroTCvJO7aH wiP3u1DVsDormhdc+/UhkbhkBx/h69uwfzDHrmxWgnaIMchI7hD6yBPOA9PZgdMBJgpf kBGVpXIH1yBer5RLDq2fLEwZdUkA5HgEpEvm69wHOotELGY0xPhjOXtWAl1PyvpfRkO4 PsIkLYUVNCu7QVQkDaTFPYNgse9jyhHbPirWMTJMzpz+wrznCnMwE3vkiFK0SraFMUkn eAzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=1XeAZdDEEMWPSRFSSrigFDHZjIaWywrJrDOcCv/SctI=; b=njO8k9/mwkYx8i717fAl6hfsnmFyfJJTuvWU2opwcovFAEfgWpp7jQk5ObNC/5znVl Vm52sBzQ2qDt0Du2pxBRCKOx4oECkKLVI+BNr9gr1wQX+dxKsGH6/VMOOf3kWgrInsu2 T5IYyzsQG059D1bBo7HYEcHcMC7L3sOac/FNHPQNlIyCo8ZPLOsq9AbxdrDwKbHncB60 Gepg1g5do0M6p2LI36eZ3OUnRY3+9LCCEzoJtE5SUlU/LkM2tiPs/dH1Q+4vrMSdGnSR R+hKEWuDQ6uVSS6tE8d8jHXHQeyf+mZKsOA9D8BN5Pd6R+bfoBlVI51x1HJZT8/2W2gE VAEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="BclSCGD/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r3si1110740otp.292.2020.02.28.00.13.26; Fri, 28 Feb 2020 00:13:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="BclSCGD/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726148AbgB1INV (ORCPT + 99 others); Fri, 28 Feb 2020 03:13:21 -0500 Received: from mail-pf1-f193.google.com ([209.85.210.193]:33269 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725871AbgB1INU (ORCPT ); Fri, 28 Feb 2020 03:13:20 -0500 Received: by mail-pf1-f193.google.com with SMTP id n7so1342839pfn.0; Fri, 28 Feb 2020 00:13:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=1XeAZdDEEMWPSRFSSrigFDHZjIaWywrJrDOcCv/SctI=; b=BclSCGD/+Gp7pLCK+Yfq+IH0orWklytTcUNiFna90KwERemW3y0lq2SFGwBTScn/ZR SOnMFpFra//MK4i1yP2XSWxhSB0AmtyVADIvnaixDjHOEilFGfAtxn96llpXGSu9w6x9 cnYc7x7sgEcbB4wEdoWPyc1hRhVj/x1T1b7yJp/3L1qebJXpWiZZcerMA4aKUSTSJzOu +EJL716Ez9KnsOA3AUIXTOEjEYftKhDFAE4pxRa3OfvNhxlaMqYrOmYwyXYyNJdP0BwU JH+Jb4ugNll/M3AjCQdCwSJWKoNoHs8e/biyVduULpYiHq+u7xkE0FG316miHyBgMLPu 3vmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=1XeAZdDEEMWPSRFSSrigFDHZjIaWywrJrDOcCv/SctI=; b=Rb5MQdLNTJfph2R87UypBvSK54SNAdcquRtbIynWhNFG7+b70BN/9Qwy/7TPZtmjbF lOuzLFK4gncNiGZ1gz6/Lc94G6+v9euOYIro0QySymlHx1mpXBeXpHscjQmXm1Qk5uBF uQjbR3inHhwVaKLP9fuMvD9XJaIW0imY6hMxJsgaiNWMqJ5nVEIKzQm5temNrqCFdX/P sTs62MOpng3NkJSTyTL35xb8JFtUwb25G90uUKERMi+h4OVV9L7W4i+zCY18QL+mJ6o9 Dt3LO6jXpOdc/WNv7TH/VY8Uu1vVtwS2oURENCYNpBWTnIhIrjsW3Vf467tgbeFDNf5N ydjw== X-Gm-Message-State: APjAAAWTKt/zFrFfhec97eLFPiRJJRNqMeO9Z7X0Q3/DbwI+UtqbA5em l8AToCXGSeDq4cVqDHFzEhU= X-Received: by 2002:aa7:93a6:: with SMTP id x6mr3341479pff.72.1582877599463; Fri, 28 Feb 2020 00:13:19 -0800 (PST) Received: from taoren-ubuntuvm (c-24-4-25-55.hsd1.ca.comcast.net. [24.4.25.55]) by smtp.gmail.com with ESMTPSA id c18sm8717917pgw.17.2020.02.28.00.13.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Feb 2020 00:13:19 -0800 (PST) Date: Fri, 28 Feb 2020 00:13:11 -0800 From: Tao Ren To: Benjamin Herrenschmidt Cc: Mark Rutland , Felipe Balbi , linux-aspeed@lists.ozlabs.org, devicetree@vger.kernel.org, Andrew Jeffery , Greg Kroah-Hartman , openbmc@lists.ozlabs.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Stephen Boyd , Rob Herring , Joel Stanley , taoren@fb.com, Chunfeng Yun , Colin Ian King , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v5 7/7] dt-bindings: usb: add documentation for aspeed usb-vhub Message-ID: <20200228081309.GA4531@taoren-ubuntuvm> References: <20200227230507.8682-1-rentao.bupt@gmail.com> <20200227230507.8682-8-rentao.bupt@gmail.com> <3150424b9e9f5856c747a0fbf44647919f49209d.camel@kernel.crashing.org> <20200228010444.GA19910@taoren-ubuntu-R90MNF91> <2676013663fc8c53e02a5fdaafb1b27e18249b80.camel@kernel.crashing.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2676013663fc8c53e02a5fdaafb1b27e18249b80.camel@kernel.crashing.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 28, 2020 at 02:02:28PM +1100, Benjamin Herrenschmidt wrote: > On Thu, 2020-02-27 at 17:05 -0800, Tao Ren wrote: > > > Also long run I think best is going to have a child node per downstream > > > port, so we create a matching linux struct device. This will make it > > > easier to deal with the other device-controller in the ast2600 which is > > > basically one of these without a vhub above it. > > > > Maybe a dumb question: what would be the proper place to parse the child > > node/properties when they are added? For example, in some usb_gadget_ops > > callback? > > No. What the vhub would do is when it probes, it creates a platform > device for each "port" child node that's linked to the DT node. > > The driver for the device then attaches to it via standard DT matching > and checks if it has a vhub parent or not, and based on that, operates > as a vhub child device or a standalone one. > > (For example, it might have different functions for EP selection since > standalone devices have private EPs rather than a shared pool) > > They can both be in the same module or they can be separate modules > with cross dependencies. > > Cheers, > Ben. I see. It's to describe these downstream devices (such as configurations and according functions) in device tree, which is similar to defining a composite device and linking functions/interfaces via configfs. Thanks for the clarify. Cheers, Tao