Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp538378pxu; Wed, 7 Oct 2020 09:22:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzx0WlrXdMi7XQtYHmvhs0kuLbOk7EdcYhPt3prpywHJ4iu+gj81YlxKhg2MjlDHm6TLP6Y X-Received: by 2002:a17:906:1d11:: with SMTP id n17mr4086948ejh.280.1602087728489; Wed, 07 Oct 2020 09:22:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602087728; cv=none; d=google.com; s=arc-20160816; b=uiAIr4uCq4/JVtLG/E6vGQJxfG+kpTxyd4QwSmi4LLxu8jxOvRORTzzoQRG1tif/E5 WquZ4H/lVBwtHPQJE+w2fakAJnwpNZjEInHJ7xGZV/J3hKNVQibB/JqmD3QxQcMQ5YOv oeXkQ/s9xkihsTs678NXqkERpZ1pf4fXLWvcvVwITYqw2xpE6P/8q57cPO/27C9vm/7g QVYrrEpo5lZFa8veVjz13xvmSoXBCdWR9/q4yHADqhKK+1MzMjGqbv5troE2xESOkurD I86h1ortBxAGw0udWi3rSHev2pOwMKvAHkVTMW826vE0OAQBEwaJyaWS2mRCDHaw0+9b n9NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=/YizpSukiZJTtNoLgWG6EzWmeqvv1MxbPNrBeNGsNyg=; b=fdpR5ton9Nu7dfJrWX6vw7J1gbK1on7sQaEcbJU5jPEilj0SM6Gm9qswEM3eoyj95K JGCbysX4/NDvwAtcfgnCFqUgmrxwY1hnvFEtH0JB8l+4HePu0SI9vf+g9Q/0OdxuShUf KyxbTjE8HUehMdldxhJF9LXkjgnzHaJ2s11cEFdqlssgqlJRLMQqiTIopLpRvWFHGTqj U/IXIP08Mw7rA1Mr+EphYlomPqSejidNe1A3R3+E0BRUdwHgWmKng1L5InKFpi1QUe/7 DK5wknXSkQF8FenP/Reo1yRAaL5ihwv4QVjWdU/q5vITrpxmWzBOvnB7nbaHVaz89IIp Ljaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="SAJM/mHJ"; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d17si1910115edv.383.2020.10.07.09.21.44; Wed, 07 Oct 2020 09:22:08 -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=@chromium.org header.s=google header.b="SAJM/mHJ"; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729013AbgJGQDk (ORCPT + 99 others); Wed, 7 Oct 2020 12:03:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729008AbgJGQDk (ORCPT ); Wed, 7 Oct 2020 12:03:40 -0400 Received: from mail-pj1-x1041.google.com (mail-pj1-x1041.google.com [IPv6:2607:f8b0:4864:20::1041]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21295C0613D3 for ; Wed, 7 Oct 2020 09:03:40 -0700 (PDT) Received: by mail-pj1-x1041.google.com with SMTP id u3so1266803pjr.3 for ; Wed, 07 Oct 2020 09:03:40 -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=/YizpSukiZJTtNoLgWG6EzWmeqvv1MxbPNrBeNGsNyg=; b=SAJM/mHJTStiuwA/RXNIoEd/I1RF/1l9WpZ5YL41ULWYJBAAyRf4Hb3TS8iEwXAuP9 RQx2iC/ixOqG0x7N+rNlcXNzqyGtWEaifDz0VEJXVx6hFkBFzXxwLcoHfAwTSEhIPzAS kkKb0hPUlzw22XBw3Fxw1empMhbvA/prllVk8= 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; bh=/YizpSukiZJTtNoLgWG6EzWmeqvv1MxbPNrBeNGsNyg=; b=AiCG6LHRzkDPqgRg1GQmF1nl+ThYpz7c3qFI+e11Kx89rnIMsrZcrRVEl/k6cdvdDJ JaGZirHXTD4O+cUyVLDeGyttr/jj9m7xuIUf7kR/Nd2DtakM4fk6qnW7omlNOJZ79bZc v4RVg80wZxNh3VdhIo/fdoZbkL/bTqdvIArJV2BN9MWCUR3EeJ+FwJAU4TNRcALGh3lV 6iuomx5dvr0+Lz2q14UgTwwbpQWcU44Y2jysRuoq2LSUHVyp6+OrRUht5dWBEVWsBOab mFP04ftXRzGiazq20LClkgRjHe4eCTLIQqt/j5rpoY9cuu/gV4f5RRbt5VsGcsob4wJS FUJA== X-Gm-Message-State: AOAM531jp+aVg6Xmevc2GRdtkdJBt3UTBGli/eQYfvQN68vRMjtg47n2 0WtAAJZylwXfhu8CZR3OMWPUhw== X-Received: by 2002:a17:90a:94cc:: with SMTP id j12mr3408857pjw.106.1602086619344; Wed, 07 Oct 2020 09:03:39 -0700 (PDT) Received: from localhost ([2620:15c:202:1:f693:9fff:fef4:e70a]) by smtp.gmail.com with ESMTPSA id x10sm3659982pfc.88.2020.10.07.09.03.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 07 Oct 2020 09:03:38 -0700 (PDT) Date: Wed, 7 Oct 2020 09:03:36 -0700 From: Matthias Kaehlcke To: Alan Stern Cc: Doug Anderson , Rob Herring , Greg Kroah-Hartman , Frank Rowand , "linux-kernel@vger.kernel.org" , Linux USB List , Bastien Nocera , Stephen Boyd , Ravi Chandra Sadineni , Krzysztof Kozlowski , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Peter Chen Subject: Re: [PATCH v4 1/2] dt-bindings: usb: Add binding for discrete onboard USB hubs Message-ID: <20201007160336.GA620323@google.com> References: <20201006004510.GD4135817@google.com> <20201006141820.GA416765@rowland.harvard.edu> <20201006165957.GA191572@google.com> <20201006171524.GB423499@rowland.harvard.edu> <20201006192536.GB191572@google.com> <20201007010023.GA438733@rowland.harvard.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20201007010023.GA438733@rowland.harvard.edu> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 06, 2020 at 09:00:23PM -0400, Alan Stern wrote: > On Tue, Oct 06, 2020 at 12:25:36PM -0700, Matthias Kaehlcke wrote: > > On Tue, Oct 06, 2020 at 01:15:24PM -0400, Alan Stern wrote: > > > You don't need a platform device or a new driver to do this. The code > > > can go in the existing hub driver. > > > > Maybe. IIUC currently USB drivers don't support/use suspend_late. Could that > > be added? It would simplify matters, otherwise all hubs need to know their > > peers and check in suspend if they are the last hub standing, only then the > > power can be switched off. It would be simpler if a single instance (e.g. the > > hub with the DT entries) is in control. > > Adding suspend_late would be a little painful. But you don't really > need it; you just need to make the "master" hub wait for its peer to > suspend, which is easy to do. Ok, I wasn't sure if the hubs suspend asynchronously from each other. If they do it should indeed not be a problem to have the "master" wait for its peers. > And hubs would need to know their peers in any case, because you have to > check if any devices attached to the peer have wakeup enabled. My concern was about all hubs (including 'secondaries') having to know their peers and check on each other, in the scenario we are now talking about only the "master" hub needs to know and check on its peers, which is fine. > > > Incidentally, the peering information is already present in sysfs, > > > although it is associated with a device's port on its upstream hub > > > rather than with the device itself. > > > > That might also help the hub driver to determine its peers without needing the > > 'companion-hubs' property. > > It wouldn't hurt to have that property anyway. The determination of > peer ports doesn't always work right, because it depends on information > provided by the firmware and that information isn't always correct. Good to know, then we should certainly have it.