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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93375CCA473 for ; Mon, 27 Jun 2022 19:06:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240105AbiF0TG0 (ORCPT ); Mon, 27 Jun 2022 15:06:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240025AbiF0TGZ (ORCPT ); Mon, 27 Jun 2022 15:06:25 -0400 Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE5A02637 for ; Mon, 27 Jun 2022 12:06:24 -0700 (PDT) Received: by mail-pg1-x535.google.com with SMTP id 9so9944572pgd.7 for ; Mon, 27 Jun 2022 12:06:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=OwptFnOeVufNyWYVaUbNezAsNgxBLnSp5YRWWMPGeU4=; b=Nep8adCrywMhk8ZutjZQ3tfryiXOviRDQw/MQJ/JqaCRwLAZt0pJQkuJPU5dUZf0T8 mzkjbRZ2Ht+PdUAcSPscDpb9zx/DbqWcULKOOejsjs9DKG/rTHE+7L/G+JDzAmlu5xbC cXz3xW2lTdrodfN1MJJZBsb4eykNpRuRhXsMI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=OwptFnOeVufNyWYVaUbNezAsNgxBLnSp5YRWWMPGeU4=; b=mB4K3oLzJambM8uyEOWpDXYMmJCCSCnv/D4VxqQ+R6LYHBsUS54RJI4bdR9ZD4H5z+ UC4mWITthg+f5PKtCVSVvABgpY6hefejLkVHmG+b4Pr9Ty1I7ny237kxaJlgkF17pg9P dmC3jxk95WF+XaTYbw2oa5B7r9YJ1aLYIk+/29lSjk3nMZy4Z4V4ERboaRAZjeuQY2/a HC4WoJxqpOZNoyICUuOU5lP6sEk1ay0jsjL0+haP8i9bU2UOYM6OpoOaZiJCnK+F38G8 wcjlnSvOYppUYNb8Y0y4xRfxOz0aPlMyw1k+FIYB3RfKbgLbx5GQq8h0VrAUEJG2fAh6 mALQ== X-Gm-Message-State: AJIora8G7SknQR+VpJLvDdTc9fNn1VK2R2eM9Bhk3kIGG17oLr+WrIar 2w4shVIiERdX163Xz1EFV0eqJg== X-Google-Smtp-Source: AGRyM1uzKMX8lc3yOB65UK4bfLsFrTm5HeZk66lgKZ+5KpmhBSQTuno7q2Sp0F6BljBpXtnRsGe1DA== X-Received: by 2002:aa7:989a:0:b0:525:252f:3c51 with SMTP id r26-20020aa7989a000000b00525252f3c51mr510250pfl.39.1656356784404; Mon, 27 Jun 2022 12:06:24 -0700 (PDT) Received: from localhost ([2620:15c:11a:202:f31c:687c:3a61:62c5]) by smtp.gmail.com with UTF8SMTPSA id f9-20020a170902f38900b0016a51167b75sm7523839ple.286.2022.06.27.12.06.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 Jun 2022 12:06:24 -0700 (PDT) Date: Mon, 27 Jun 2022 12:06:21 -0700 From: Matthias Kaehlcke To: Alan Stern Cc: Doug Anderson , Greg Kroah-Hartman , Rob Herring , Frank Rowand , Mathias Nyman , Felipe Balbi , Michal Simek , LKML , Krzysztof Kozlowski , Stephen Boyd , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Bastien Nocera , Peter Chen , Ravi Chandra Sadineni , Roger Quadros , Linux USB List , Geert Uytterhoeven , Souradeep Chowdhury Subject: Re: [PATCH v22 2/3] usb: misc: Add onboard_usb_hub driver Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Mon, Jun 27, 2022 at 02:54:03PM -0400, Alan Stern wrote: > On Mon, Jun 27, 2022 at 11:14:47AM -0700, Matthias Kaehlcke wrote: > > Maybe a bit more verbose documentation like this could help: > > > > Some background about the logic in this function, which can be a bit hard > > to follow: > > > > Root hubs don't have dedicated device tree nodes, but use the node of their > > HCD. The primary and secondary HCD are usually represented by a single DT > > node. That means the root hubs of the primary and secondary HCD share the > > same device tree node (the HCD node). As a result this function can be > > called twice with the same DT node for root hubs. We only want to create a > > single platform device for each physical onboard hub, hence for root hubs > > the loop is only executed for the primary hub. Since the function scans > > By "primary hub", you mean "root hub for the primary HCD", right? This > should be clarified. Ok, thanks for the suggestion! > > through all child nodes it still creates pdevs for onboard hubs connected > > to the secondary hub if needed. > > And likewise for "secondary hub". > > > > > Further there must be only one platform device for onboard hubs with a > > companion hub (the hub is a single physical device). To achieve this two > > What do you mean by "companion hub"? I think you are using the wrong > word here. If you're talking about the relation between the two logical > hubs (one attached to the SuperSpeed bus and one attached to the > Low/Full/High-speed bus) within a physical USB-3 hub, the correct term > for this is "peer". See the existing usages in hub.h, hub.c, and > port.c. > > "Companion" refers to something completely different (i.e., the UHCI or > OHCI controllers that handle Low/Full-speed connections on behalf of a > High-speed EHCI controller). Yes it's the relation between the two logical hub. The term 'companion-hub' stems from the binding and has been around since v6 of this series. I guess we should update the binding if the terminology isn't correct.