Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3881978pxf; Tue, 6 Apr 2021 02:37:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwUmOj53v4G8bQ10sVS6PMmtNbNG+BMmHau1hwVhdSvADeA/HI8BNEEpvokCx2A5mSkVM3Q X-Received: by 2002:a92:dacc:: with SMTP id o12mr2094236ilq.157.1617701849576; Tue, 06 Apr 2021 02:37:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617701849; cv=none; d=google.com; s=arc-20160816; b=BHwei6JqXyEgVkwrNUnPL76rdfKXr3VGtrLG2hVnyZHXQV29dkFWZ8RysopRXC56v3 +PM4AW1Cpfi24DReyxwyiayZzhckVTr3Gr5jn2CklbEHR86feo3ica2gsqbjHSqmiEWQ x4701ZuwQwMWzUQHiX6kv4sRoBiaHHnlju5ptXbQ9jSJoX0HibPKJPnP3OZUUFmKCXSh I+DeSOpgnWAKblGMeesIBGuDo4uRCRy/LxiPM9ZsSnYXn42QoiA1ir4dAz+Q46/zu1/K 35ffgP4nZqjIjlhlZkaLS7UoyRUmibOK/V//Jf7CgrAPqg6QvINbl50JfDWI331PmT19 RbYQ== 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=B5obkrFLYx+0aH/s+FuNLaF5WWutNw3wmJyEfHXrNTo=; b=N6uVKA+KPvR+ZaETWuw6361qvtYlNDaVSThLtMo7ZNASpGG9MwrNUfINf6pf6pvuFs h7o6LtfJpZYUbEPXysr8dUNgYvNt3bYcySstvEEfk0FhAuYoM18zdYUkPLAlzSgLUEYM +Kz8tvqrZi96rOKnWvl5XlaHb42VOLDnNQaZZc9SJUKaTUk7T1nYSfCNg4dGbknmApuI PDR76eNRh3Qr7fAMpRDxdtBGWe9W2mllUu1pkDVwkK1es/ldAkyCcwgrRBCpgO15SujO k0JKie1jqDMEWZJpyv5+WWx47LGKVIqqG/e9iOmvjWn9g04ZFHYOZ/CXviiMc/c2Trjq ZlKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Dz1R38ze; 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 y14si8261322ilj.76.2021.04.06.02.37.17; Tue, 06 Apr 2021 02:37:29 -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=Dz1R38ze; 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 S235467AbhDEUWq (ORCPT + 99 others); Mon, 5 Apr 2021 16:22:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235001AbhDEUWp (ORCPT ); Mon, 5 Apr 2021 16:22:45 -0400 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21ABFC06178C for ; Mon, 5 Apr 2021 13:22:38 -0700 (PDT) Received: by mail-pl1-x631.google.com with SMTP id t20so6208836plr.13 for ; Mon, 05 Apr 2021 13:22:38 -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=B5obkrFLYx+0aH/s+FuNLaF5WWutNw3wmJyEfHXrNTo=; b=Dz1R38zeXda0R96wffR/yYYt3zYyxi+Sz2qq0KhUjm9AE+KvCSg+cH1pA2biRTyuNX UkxMX5rVM4CugL75QdaNtdTZhBXQ1ksr/Tv7wDP5ZJxA5PjDESnws3lBidDp+tX3CbBB DmDw7iYiII9YCgWTVo62HHorE//xEfyCU94ms= 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=B5obkrFLYx+0aH/s+FuNLaF5WWutNw3wmJyEfHXrNTo=; b=hPFIIYUwmoGlPtPflTUbylbQniBVPzw77q4re3wf2PBClHfiHF8NZIr1OLzDqV85hQ d08o8i8jfAh74/0LGD6lyrmojGftKAkF9kv/ZR4F+CRwp8iFuGngebmetUDh+J1fZVP3 peu2uhdayDvwxb++xGy5Jr1CfmZI45jl+7dP9M8vM0Y2fALwkBdgoEd0/s/GkWlIuCr1 OIzJ3sCkMguXkSDE2l4bZe25Yr9B6oMzsQKHa46N08Gli3CNkcLwxWUcBryKWqcuZKVw QYLXQvazIaoiio1Gmxn+MLKFtV9GxO87bGtWpzawprbiXhroQu+6oYfHSv6JtDytA81s M6UA== X-Gm-Message-State: AOAM531Mso7VLoQq9EhxhaA7AeV+AjDxSNih0no5utBMA8w6br49EWtp ZBBV6U1kCdsQt1ki2cA6UzGzEw== X-Received: by 2002:a17:90b:3cd:: with SMTP id go13mr866569pjb.148.1617654157581; Mon, 05 Apr 2021 13:22:37 -0700 (PDT) Received: from localhost ([2620:15c:202:201:455e:b8cf:5939:67da]) by smtp.gmail.com with UTF8SMTPSA id e14sm9371544pga.14.2021.04.05.13.22.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 05 Apr 2021 13:22:37 -0700 (PDT) Date: Mon, 5 Apr 2021 13:22:36 -0700 From: Matthias Kaehlcke To: Greg Kroah-Hartman , Alan Stern , Rob Herring , Frank Rowand Cc: linux-kernel@vger.kernel.org, Krzysztof Kozlowski , Douglas Anderson , Peter Chen , Michal Simek , linux-usb@vger.kernel.org, Ravi Chandra Sadineni , Bastien Nocera , devicetree@vger.kernel.org, Stephen Boyd , Al Cooper , "Alexander A. Klimov" , Andy Gross , Bjorn Andersson , Masahiro Yamada , Mathias Nyman , linux-arm-msm@vger.kernel.org Subject: Re: [PATCH v6 0/5] USB: misc: Add onboard_usb_hub driver Message-ID: References: <20210405201817.3977893-1-mka@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210405201817.3977893-1-mka@chromium.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Subject: [PATCH v6 0/5] USB: misc: Add onboard_usb_hub driver Argh, that should have been v7 :/ Not sure if it's worth/required to resend. On Mon, Apr 05, 2021 at 01:18:12PM -0700, Matthias Kaehlcke wrote: > This series adds: > - the onboard_usb_hub_driver > - glue in the xhci-plat driver to create the onboard_usb_hub > platform device if needed > - a device tree binding for the Realtek RTS5411 USB hub controller > - device tree changes that add RTS5411 entries for the QCA SC7180 > based boards trogdor and lazor > - a couple of stubs for platform device functions to avoid > unresolved symbols with certain kernel configs > > The main issue the driver addresses is that a USB hub needs to be > powered before it can be discovered. For discrete onboard hubs (an > example for such a hub is the Realtek RTS5411) this is often solved > by supplying the hub with an 'always-on' regulator, which is kind > of a hack. Some onboard hubs may require further initialization > steps, like changing the state of a GPIO or enabling a clock, which > requires even more hacks. This driver creates a platform device > representing the hub which performs the necessary initialization. > Currently it only supports switching on a single regulator, support > for multiple regulators or other actions can be added as needed. > Different initialization sequences can be supported based on the > compatible string. > > Besides performing the initialization the driver can be configured > to power the hub off during system suspend. This can help to extend > battery life on battery powered devices which have no requirements > to keep the hub powered during suspend. The driver can also be > configured to leave the hub powered when a wakeup capable USB device > is connected when suspending, and power it off otherwise. > > Changes in v7: > - series rebased on qcom/arm64-for-5.13 > > Changes in v6: > - updated summary > > Changes in v5: > - cover letter added > > Matthias Kaehlcke (5): > dt-bindings: usb: Add binding for Realtek RTS5411 hub controller > USB: misc: Add onboard_usb_hub driver > of/platform: Add stubs for of_platform_device_create/destroy() > usb: host: xhci-plat: Create platform device for onboard hubs in > probe() > arm64: dts: qcom: sc7180-trogdor: Add nodes for onboard USB hub > > .../sysfs-bus-platform-onboard-usb-hub | 8 + > .../bindings/usb/realtek,rts5411.yaml | 59 +++ > MAINTAINERS | 7 + > .../boot/dts/qcom/sc7180-trogdor-lazor-r0.dts | 19 +- > .../boot/dts/qcom/sc7180-trogdor-lazor-r1.dts | 11 +- > .../arm64/boot/dts/qcom/sc7180-trogdor-r1.dts | 19 +- > arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 21 +- > drivers/usb/host/xhci-plat.c | 16 + > drivers/usb/misc/Kconfig | 17 + > drivers/usb/misc/Makefile | 1 + > drivers/usb/misc/onboard_usb_hub.c | 415 ++++++++++++++++++ > include/linux/of_platform.h | 22 +- > include/linux/usb/hcd.h | 2 + > include/linux/usb/onboard_hub.h | 15 + > 14 files changed, 596 insertions(+), 36 deletions(-) > create mode 100644 Documentation/ABI/testing/sysfs-bus-platform-onboard-usb-hub > create mode 100644 Documentation/devicetree/bindings/usb/realtek,rts5411.yaml > create mode 100644 drivers/usb/misc/onboard_usb_hub.c > create mode 100644 include/linux/usb/onboard_hub.h > > -- > 2.31.0.208.g409f899ff0-goog >