From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
To: Guangshuo Li <lgs201920130244@gmail.com>
Cc: Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"neil.armstrong@linaro.org" <neil.armstrong@linaro.org>,
"khilman@baylibre.com" <khilman@baylibre.com>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-amlogic@lists.infradead.org"
<linux-amlogic@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"jbrunet@baylibre.com" <jbrunet@baylibre.com>,
"martin.blumenstingl@googlemail.com"
<martin.blumenstingl@googlemail.com>,
"felipe.balbi@linux.intel.com" <felipe.balbi@linux.intel.com>
Subject: Re: [PATCH] usb: dwc3: meson-g12a: disable VBUS regulator on remove
Date: Fri, 2 Oct 2026 03:18:38 +0000 [thread overview]
Message-ID: <ar8iVIgFdBpIbCsl@vbox> (raw)
In-Reply-To: <20260924110429.1557653-1-lgs201920130244@gmail.com>
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
>
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
WARNING: multiple messages have this Message-ID (diff)
From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
To: Guangshuo Li <lgs201920130244@gmail.com>
Cc: Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"neil.armstrong@linaro.org" <neil.armstrong@linaro.org>,
"khilman@baylibre.com" <khilman@baylibre.com>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-amlogic@lists.infradead.org"
<linux-amlogic@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"jbrunet@baylibre.com" <jbrunet@baylibre.com>,
"martin.blumenstingl@googlemail.com"
<martin.blumenstingl@googlemail.com>,
"felipe.balbi@linux.intel.com" <felipe.balbi@linux.intel.com>
Subject: Re: [PATCH] usb: dwc3: meson-g12a: disable VBUS regulator on remove
Date: Fri, 2 Oct 2026 03:18:38 +0000 [thread overview]
Message-ID: <ar8iVIgFdBpIbCsl@vbox> (raw)
In-Reply-To: <20260924110429.1557653-1-lgs201920130244@gmail.com>
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
>
next prev parent reply other threads:[~2026-10-02 3:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-24 11:04 [PATCH] usb: dwc3: meson-g12a: disable VBUS regulator on remove Guangshuo Li
2026-09-24 11:04 ` Guangshuo Li
2026-09-24 11:12 ` sashiko-bot
2026-10-02 3:18 ` Thinh Nguyen [this message]
2026-10-02 3:18 ` Thinh Nguyen
2026-10-02 9:29 ` gregkh
2026-10-02 9:29 ` gregkh
2026-10-03 1:26 ` Thinh Nguyen
2026-10-03 1:26 ` Thinh Nguyen
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=ar8iVIgFdBpIbCsl@vbox \
--to=thinh.nguyen@synopsys.com \
--cc=felipe.balbi@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=jbrunet@baylibre.com \
--cc=khilman@baylibre.com \
--cc=lgs201920130244@gmail.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=neil.armstrong@linaro.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.