All of lore.kernel.org
 help / color / mirror / Atom feed
From: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
To: Jisheng Zhang <jszhang@kernel.org>,
	Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] usb: dwc2: disable platform lowlevel hw resources during shutdown
Date: Mon, 30 Jun 2025 06:40:01 +0000	[thread overview]
Message-ID: <cd7a3c4a-13fd-c87a-e410-48927f76a7b0@synopsys.com> (raw)
In-Reply-To: <20250629094655.747-1-jszhang@kernel.org>



On 6/29/25 13:46, Jisheng Zhang wrote:
> On some SoC platforms, in shutdown stage, most components' power is cut
> off, but there's still power supply to the so called always-on
> domain, so if the dwc2's regulator is from the always-on domain, we
> need to explicitly disable it to save power.
> 
> Disable platform lowlevel hw resources such as phy, clock and
> regulators etc. in device shutdown hook to reduce non-necessary power
> consumption when the platform enters shutdown stage.
> 
> Signed-off-by: Jisheng Zhang <jszhang@kernel.org>

Acked-by: Minas Harutyunyan <hminas@synopsys.com>

> ---
>   drivers/usb/dwc2/platform.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c
> index 12b4dc07d08a..3f83ecc9fc23 100644
> --- a/drivers/usb/dwc2/platform.c
> +++ b/drivers/usb/dwc2/platform.c
> @@ -371,6 +371,9 @@ static void dwc2_driver_shutdown(struct platform_device *dev)
>   
>   	dwc2_disable_global_interrupts(hsotg);
>   	synchronize_irq(hsotg->irq);
> +
> +	if (hsotg->ll_hw_enabled)
> +		dwc2_lowlevel_hw_disable(hsotg);
>   }
>   
>   /**

      reply	other threads:[~2025-06-30  6:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-29  9:46 [PATCH] usb: dwc2: disable platform lowlevel hw resources during shutdown Jisheng Zhang
2025-06-30  6:40 ` Minas Harutyunyan [this message]

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=cd7a3c4a-13fd-c87a-e410-48927f76a7b0@synopsys.com \
    --to=minas.harutyunyan@synopsys.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jszhang@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.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.