usb: core: hcd: Create platform devices for onboard hubs in probe()
authorMatthias Kaehlcke <mka@chromium.org>
Thu, 17 Feb 2022 18:42:54 +0000 (10:42 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Apr 2022 12:01:12 +0000 (14:01 +0200)
commitc40b62216c1aecc0dc00faf33d71bd71cb440337
treecba8dfe54ff4c3163f4856a21c120c77addac1dc
parent0298b4b95cb373c21e6323c905589f8dac42c5b4
usb: core: hcd: Create platform devices for onboard hubs in probe()

Call onboard_hub_create/destroy_pdevs() from usb_add/remove_hcd()
for primary HCDs 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 usb_hcd to keep track of the onboard hub
platform devices that are owned by the HCD.

Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Link: https://lore.kernel.org/r/20220217104219.v21.3.I7a3a7d9d2126c34079b1cab87aa0b2ec3030f9b7@changeid
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/hcd.c
include/linux/usb/hcd.h