* [PATCH] usb: dwc3: meson-g12a: disable VBUS regulator on remove
@ 2026-09-24 11:04 Guangshuo Li
2026-10-02 3:18 ` Thinh Nguyen
0 siblings, 1 reply; 3+ messages in thread
From: Guangshuo Li @ 2026-09-24 11:04 UTC (permalink / raw)
To: Thinh.Nguyen, gregkh, neil.armstrong, khilman
Cc: linux-usb, linux-arm-kernel, linux-amlogic, linux-kernel,
jbrunet, martin.blumenstingl, felipe.balbi, lgs201920130244
dwc3_meson_g12a_probe() enables priv->vbus when the optional regulator is
present, but dwc3_meson_g12a_remove() does not perform the matching
regulator_disable(). The probe error path already disables the regulator
before rearming the reset control.
Disable priv->vbus in the remove path before reset_control_rearm() to
match the cleanup performed by the probe error path.
Fixes: c99993376f72 ("usb: dwc3: Add Amlogic G12A DWC3 glue")
Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com>
---
drivers/usb/dwc3/dwc3-meson-g12a.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/usb/dwc3/dwc3-meson-g12a.c b/drivers/usb/dwc3/dwc3-meson-g12a.c
index 4d611c08e8a4..7ca6fb89027f 100644
--- a/drivers/usb/dwc3/dwc3-meson-g12a.c
+++ b/drivers/usb/dwc3/dwc3-meson-g12a.c
@@ -851,6 +851,9 @@ static void dwc3_meson_g12a_remove(struct platform_device *pdev)
pm_runtime_put_noidle(dev);
pm_runtime_set_suspended(dev);
+ if (priv->vbus)
+ regulator_disable(priv->vbus);
+
reset_control_rearm(priv->reset);
clk_bulk_disable_unprepare(priv->drvdata->num_clks,
base-commit: f03c39de3a1307371a4032757cd1732e91087c7d
--
2.43.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] usb: dwc3: meson-g12a: disable VBUS regulator on remove
2026-09-24 11:04 [PATCH] usb: dwc3: meson-g12a: disable VBUS regulator on remove Guangshuo Li
@ 2026-10-02 3:18 ` Thinh Nguyen
2026-10-02 9:29 ` gregkh
0 siblings, 1 reply; 3+ messages in thread
From: Thinh Nguyen @ 2026-10-02 3:18 UTC (permalink / raw)
To: Guangshuo Li
Cc: Thinh Nguyen, gregkh, neil.armstrong, khilman, linux-usb,
linux-arm-kernel, linux-amlogic, linux-kernel, jbrunet,
martin.blumenstingl, felipe.balbi
On Thu, Sep 24, 2026, Guangshuo Li wrote:
> dwc3_meson_g12a_probe() enables priv->vbus when the optional regulator is
> present, but dwc3_meson_g12a_remove() does not perform the matching
> regulator_disable(). The probe error path already disables the regulator
> before rearming the reset control.
>
> Disable priv->vbus in the remove path before reset_control_rearm() to
> match the cleanup performed by the probe error path.
>
> Fixes: c99993376f72 ("usb: dwc3: Add Amlogic G12A DWC3 glue")
We should also include Cc stable.
Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Thanks,
Thinh
> Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com>
> ---
> drivers/usb/dwc3/dwc3-meson-g12a.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/usb/dwc3/dwc3-meson-g12a.c b/drivers/usb/dwc3/dwc3-meson-g12a.c
> index 4d611c08e8a4..7ca6fb89027f 100644
> --- a/drivers/usb/dwc3/dwc3-meson-g12a.c
> +++ b/drivers/usb/dwc3/dwc3-meson-g12a.c
> @@ -851,6 +851,9 @@ static void dwc3_meson_g12a_remove(struct platform_device *pdev)
> pm_runtime_put_noidle(dev);
> pm_runtime_set_suspended(dev);
>
> + if (priv->vbus)
> + regulator_disable(priv->vbus);
> +
> reset_control_rearm(priv->reset);
>
> clk_bulk_disable_unprepare(priv->drvdata->num_clks,
>
> base-commit: f03c39de3a1307371a4032757cd1732e91087c7d
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] usb: dwc3: meson-g12a: disable VBUS regulator on remove
2026-10-02 3:18 ` Thinh Nguyen
@ 2026-10-02 9:29 ` gregkh
0 siblings, 0 replies; 3+ messages in thread
From: gregkh @ 2026-10-02 9:29 UTC (permalink / raw)
To: Thinh Nguyen
Cc: Guangshuo Li, neil.armstrong, khilman, linux-usb,
linux-arm-kernel, linux-amlogic, linux-kernel, jbrunet,
martin.blumenstingl, felipe.balbi
On Fri, Oct 02, 2026 at 03:18:38AM +0000, Thinh Nguyen wrote:
> On Thu, Sep 24, 2026, Guangshuo Li wrote:
> > dwc3_meson_g12a_probe() enables priv->vbus when the optional regulator is
> > present, but dwc3_meson_g12a_remove() does not perform the matching
> > regulator_disable(). The probe error path already disables the regulator
> > before rearming the reset control.
> >
> > Disable priv->vbus in the remove path before reset_control_rearm() to
> > match the cleanup performed by the probe error path.
> >
> > Fixes: c99993376f72 ("usb: dwc3: Add Amlogic G12A DWC3 glue")
>
> We should also include Cc stable.
Maybe if the sashiko results are fixed first, this is dropped from my
review queue.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-10-02 9:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-24 11:04 [PATCH] usb: dwc3: meson-g12a: disable VBUS regulator on remove Guangshuo Li
2026-10-02 3:18 ` Thinh Nguyen
2026-10-02 9:29 ` gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®