Linux USB
 help / color / mirror / Atom feed
From: Felix Gu <ustc.gu@gmail.com>
To: Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
	 Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	 WingMan Kwok <w-kwok2@ti.com>, Felipe Balbi <balbi@ti.com>,
	 Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: linux-usb@vger.kernel.org, Felix Gu <ustc.gu@gmail.com>
Subject: [PATCH] usb: dwc3: keystone: Fix missing child after rebind
Date: Sun, 22 Nov 2026 23:43:20 +0800	[thread overview]
Message-ID: <20261122-keystone-1-v1-1-5cf9bb522f65@gmail.com> (raw)

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>


             reply	other threads:[~2026-11-22 15:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-22 15:43 Felix Gu [this message]
2026-11-22 15:48 ` [PATCH] usb: dwc3: keystone: Fix missing child after rebind sashiko-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261122-keystone-1-v1-1-5cf9bb522f65@gmail.com \
    --to=ustc.gu@gmail.com \
    --cc=Thinh.Nguyen@synopsys.com \
    --cc=balbi@ti.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=santosh.shilimkar@ti.com \
    --cc=w-kwok2@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox