Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1069905pxj; Fri, 21 May 2021 05:54:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1v/Eo9/3HxZjaiPZTHS6LmR0UKapQHz5F579FFs5b7zLUUkSu0ATY/WrONH6nV179Q3Zd X-Received: by 2002:aa7:d282:: with SMTP id w2mr10990138edq.45.1621601666436; Fri, 21 May 2021 05:54:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621601666; cv=none; d=google.com; s=arc-20160816; b=P+wlLn8gGXUNzezlccxSBLD6UH6l/FZojCOlOguiF3pwy2XQ0JzmqPTzCf8xopZ+1H 62XcTwlReBjej/u9NyR+88EsAR+tDGT0ynlzL7gMBhOMoEtp303FMwv7miycEyNMu8hW 6bIH2c1XFAu02S8P84n4VKn7RiTnLEds3jwhBTu9iyCvw+YzaQNxZ2+Y6a6lpYZSFtcc wcHiTtRhhnYXDBvo+etOPekRo9kWKwhUVR85uWWFkljiNAnolesjWOqeIk5oBnnAPHAK MOoU/L16Z9K8uNrWYpTa3hXA5y3vLYNYWdYJBe7x5XyU0lIFbt8dH7nJItB86xw8xOKC 4Rsw== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=TckkaH9aUIEpLFokM5rqKdtGxzLw4KeutDXIiYeFmqA=; b=epUhYYb0VwP11AiT+RiR6TnOs4exNS1XOdvBiUOLm+QUzr08iJ/fhLiXj7TJhk7U7v J8h7CY/eiQAdCW0DhjgirHR5Oso7mvUAvDUhonbCYulTvezufECnFK8DdSosOIL9W6d2 iPusT23hMZ87As4XBiJM5BezIZWP6iRxwY2lsByeWLTkdUjyBdVpUy4dQRkTscfvizdr A654sSOwqkefsqwva/XTNWbIAPVpK1BcUihDJyRuLIUJhXzih7SNtoQBRNgx6GkB7BOf BJZsaCc4FImy7Gp3ONnm5j1Am6H97Sr7Q+PbhBd/jV18gzJIVnssBskNE3x/IAstWiJg ir0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=NkSYof96; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dc21si5024995edb.209.2021.05.21.05.54.00; Fri, 21 May 2021 05:54:26 -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=@linuxfoundation.org header.s=korg header.b=NkSYof96; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233418AbhEUMcJ (ORCPT + 99 others); Fri, 21 May 2021 08:32:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:56962 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229457AbhEUMcG (ORCPT ); Fri, 21 May 2021 08:32:06 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8704D613CB; Fri, 21 May 2021 12:30:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621600242; bh=WB+fBlPHBnhxEgANiqKZDpv4r2qZ1G7A7Ilm+g9XvYs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NkSYof96n1ni9YaXtJy1dsy3I6eShNepbRidbdb48dgtsc1dJGUnEcgjs+KRX4fyB em5zTqTnwwGiyKjylT3F8q3B4qWsxlR51M2OA/o0WIO1q5x/IzqGLsiVmxH5g6u17w LQp9FVG7oXJkAh7gQyLgz59BrGhOcu1PsUbb23lU= Date: Fri, 21 May 2021 14:30:39 +0200 From: Greg Kroah-Hartman To: Matthias Kaehlcke Cc: Alan Stern , Rob Herring , Frank Rowand , Michal Simek , devicetree@vger.kernel.org, Douglas Anderson , linux-usb@vger.kernel.org, Peter Chen , linux-kernel@vger.kernel.org, Stephen Boyd , Ravi Chandra Sadineni , Krzysztof Kozlowski , Bastien Nocera , Al Cooper , "Alexander A. Klimov" , Andy Gross , Bjorn Andersson , Christian Lamparter , Colin Ian King , Dmitry Osipenko , Fabio Estevam , Masahiro Yamada , Mathias Nyman , Vinod Koul , linux-arm-msm@vger.kernel.org Subject: Re: [PATCH v10 0/5] USB: misc: Add onboard_usb_hub driver Message-ID: References: <20210511225223.550762-1-mka@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210511225223.550762-1-mka@chromium.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 11, 2021 at 03:52:18PM -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. I get a build error when I apply this series to my tree: drivers/usb/misc/onboard_usb_hub.c:273:6: error: redefinition of ‘of_is_onboard_usb_hub’ 273 | bool of_is_onboard_usb_hub(const struct device_node *np) | ^~~~~~~~~~~~~~~~~~~~~ In file included from drivers/usb/misc/onboard_usb_hub.c:21: ./include/linux/usb/onboard_hub.h:9:20: note: previous definition of ‘of_is_onboard_usb_hub’ with type ‘bool(const struct device_node *)’ {aka ‘_Bool(const struct device_node *)’} 9 | static inline bool of_is_onboard_usb_hub(const struct device_node *np) | ^~~~~~~~~~~~~~~~~~~~~ Any thoughts? greg k-h