[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aea3a5ad-d511-743f-90f8-3735a07a2b24@synopsys.com>
Date: Mon, 19 Apr 2021 07:31:40 +0000
From: Minas Harutyunyan <Minas.Harutyunyan@...opsys.com>
To: Artur Petrosyan <Arthur.Petrosyan@...opsys.com>,
Felipe Balbi <balbi@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC: John Youn <John.Youn@...opsys.com>
Subject: Re: [PATCH v2 11/15] usb: dwc2: Add hibernation entering flow by
system suspend
On 4/16/2021 4:48 PM, Artur Petrosyan wrote:
> Adds a new flow of entering hibernation when PC is
> hibernated or suspended.
>
> Signed-off-by: Artur Petrosyan <Arthur.Petrosyan@...opsys.com>
Acked-by: Minas Harutyunyan <Minas.Harutyunyan@...opsys.com>
> ---
> Changes in v2:
> - None
>
> drivers/usb/dwc2/hcd.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c
> index 093b1717df01..92848629cc61 100644
> --- a/drivers/usb/dwc2/hcd.c
> +++ b/drivers/usb/dwc2/hcd.c
> @@ -4387,6 +4387,16 @@ static int _dwc2_hcd_suspend(struct usb_hcd *hcd)
> clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
> break;
> case DWC2_POWER_DOWN_PARAM_HIBERNATION:
> + /* Enter hibernation */
> + spin_unlock_irqrestore(&hsotg->lock, flags);
> + ret = dwc2_enter_hibernation(hsotg, 1);
> + if (ret)
> + dev_err(hsotg->dev, "enter hibernation failed\n");
> + spin_lock_irqsave(&hsotg->lock, flags);
> +
> + /* After entering suspend, hardware is not accessible */
> + clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
> + break;
> case DWC2_POWER_DOWN_PARAM_NONE:
> /*
> * If not hibernation nor partial power down are supported,
>
Powered by blists - more mailing lists