usb: core: hub: Create platform devices for onboard hubs in hub_probe()
authorMatthias Kaehlcke <mka@chromium.org>
Thu, 30 Jun 2022 19:35:30 +0000 (12:35 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Jul 2022 12:53:50 +0000 (14:53 +0200)
commit3a6bf4a08142826698121bef16b244dcf50a6431
treeb6e5a07476c00225dd3173de39529f081f210d38
parent8bc063641cebf9d555e41d135db2b5035b521768
usb: core: hub: Create platform devices for onboard hubs in hub_probe()

Call onboard_hub_create/destroy_pdevs() from hub_probe/disconnect()
to create/destroy platform devices for onboard USB hubs that may be
connected to the hub. The onboard hubs must have nodes in the
device tree.

onboard_hub_create/destroy_pdevs() are NOPs unless
CONFIG_USB_ONBOARD_HUB=y/m.

Also add a field to struct usb_hub to keep track of the onboard hub
platform devices that are owned by the hub.

Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Link: https://lore.kernel.org/r/20220630123445.v24.4.Ic9dd36078f9d803de82ca01a6700c58b8e4de27e@changeid
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/hub.c
drivers/usb/core/hub.h