[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YXB7vIP6ifQS3T4o@google.com>
Date: Wed, 20 Oct 2021 13:27:40 -0700
From: Matthias Kaehlcke <mka@...omium.org>
To: Mathias Nyman <mathias.nyman@...ux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Alan Stern <stern@...land.harvard.edu>,
Rob Herring <robh+dt@...nel.org>,
Frank Rowand <frowand.list@...il.com>,
Mathias Nyman <mathias.nyman@...el.com>,
Felipe Balbi <balbi@...nel.org>, devicetree@...r.kernel.org,
Peter Chen <peter.chen@...nel.org>,
linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org,
Bastien Nocera <hadess@...ess.net>,
Ravi Chandra Sadineni <ravisadineni@...omium.org>,
Michal Simek <michal.simek@...inx.com>,
Douglas Anderson <dianders@...omium.org>,
Roger Quadros <rogerq@...nel.org>,
Krzysztof Kozlowski <krzk@...nel.org>,
Stephen Boyd <swboyd@...omium.org>,
Dmitry Osipenko <digetx@...il.com>,
Fabio Estevam <festevam@...il.com>
Subject: Re: [PATCH v16 6/7] usb: host: xhci-plat: Create platform device for
onboard hubs in probe()
Hi Mathias,
On Wed, Oct 20, 2021 at 04:05:37PM +0300, Mathias Nyman wrote:
> Hi
>
> On 13.8.2021 22.52, Matthias Kaehlcke wrote:
> > Call onboard_hub_create/destroy_pdevs() from _probe()/_remove()
> > to create/destroy platform devices for onboard USB hubs that may
> > be connected to the root hub of the controller. These functions
> > are a NOP unless CONFIG_USB_ONBOARD_HUB=y/m.
> >
> > Also add a field to struct xhci_hcd to keep track of the onboard hub
> > platform devices that are owned by the xHCI.
> >
> > Signed-off-by: Matthias Kaehlcke <mka@...omium.org>
> > ---
>
> Haven't really looked at this series until now.
>
> Is there any reason why the xhci platform driver was selected as
> the best place to create/remove these onboard hub devices?
IIRC Alan suggested to use the xhci platform driver for creating/removing
the onboard hub devices when we were trying to get rid of a separate DT
node on the 'platform bus', which was suitable the board for my use case.
> This ties the onboard hubs to xhci, and won't work in case we have onboard
> hubs connected to a ehci controllers.
Right, the driver itself isn't limited to xhci. The initial idea was that
support for other types of USB controllers could be added as needed (I only
have a config with xhci for testing).
> If separate devices for controlling onboard hub power is the right solution then
> how about creating the onboard hub device in usb_add_hcd() (hcd.c), and
> store it in struct usb_hcd.
>
> A bit like how the roothub device is created, or PHYs are tuned.
Sure, that sounds feasible, even better if it's handled in a single place
and different types of controllers don't have to add support separately.
Powered by blists - more mailing lists