* [PATCH] usb: dwc3: keystone: Fix missing child after rebind
@ 2026-11-22 15:43 Felix Gu
2026-11-22 15:48 ` sashiko-bot
0 siblings, 1 reply; 2+ messages in thread
From: Felix Gu @ 2026-11-22 15:43 UTC (permalink / raw)
To: Thinh Nguyen, Greg Kroah-Hartman, WingMan Kwok, Felipe Balbi,
Santosh Shilimkar
Cc: linux-usb, Felix Gu
Directly unregistering the DWC3 child leaves OF_POPULATED set,
preventing its recreation on rebind. Use of_platform_depopulate()
to clear the population flags during removal.
Fixes: 943befc314ae ("usb: dwc3: add Keystone specific glue layer")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
---
drivers/usb/dwc3/dwc3-keystone.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/drivers/usb/dwc3/dwc3-keystone.c b/drivers/usb/dwc3/dwc3-keystone.c
index 7a5fc8545d4b..ee3da7945c87 100644
--- a/drivers/usb/dwc3/dwc3-keystone.c
+++ b/drivers/usb/dwc3/dwc3-keystone.c
@@ -170,15 +170,6 @@ static int kdwc3_probe(struct platform_device *pdev)
return error;
}
-static int kdwc3_remove_core(struct device *dev, void *c)
-{
- struct platform_device *pdev = to_platform_device(dev);
-
- platform_device_unregister(pdev);
-
- return 0;
-}
-
static void kdwc3_remove(struct platform_device *pdev)
{
struct dwc3_keystone *kdwc = platform_get_drvdata(pdev);
@@ -187,7 +178,7 @@ static void kdwc3_remove(struct platform_device *pdev)
if (!of_device_is_compatible(node, "ti,am654-dwc3"))
kdwc3_disable_irqs(kdwc);
- device_for_each_child(&pdev->dev, NULL, kdwc3_remove_core);
+ of_platform_depopulate(&pdev->dev);
pm_runtime_put_sync(kdwc->dev);
pm_runtime_disable(kdwc->dev);
---
base-commit: adcad7f4e6332cff3d6d7165f41584899f598534
change-id: 20261122-keystone-1-43327f3e1585
Best regards,
--
Felix Gu <ustc.gu@gmail.com>
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-22 15:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-22 15:43 [PATCH] usb: dwc3: keystone: Fix missing child after rebind Felix Gu
2026-11-22 15:48 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox