Commit 9e779778 authored by Gregory Herrero's avatar Gregory Herrero Committed by Felipe Balbi

usb: dwc2: gadget: ignore pm suspend/resume in L2

Nothing to be done in pm suspend/resume when controller is in L2.
Don't disconnect or reset. State is already saved when putting
controller in hibernation and will be restored on USB bus resume.
Acked-by: default avatarJohn Youn <johnyoun@synopsys.com>
Signed-off-by: default avatarGregory Herrero <gregory.herrero@intel.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 4876886f
...@@ -3672,6 +3672,9 @@ int s3c_hsotg_suspend(struct dwc2_hsotg *hsotg) ...@@ -3672,6 +3672,9 @@ int s3c_hsotg_suspend(struct dwc2_hsotg *hsotg)
unsigned long flags; unsigned long flags;
int ret = 0; int ret = 0;
if (hsotg->lx_state != DWC2_L0)
return ret;
mutex_lock(&hsotg->init_mutex); mutex_lock(&hsotg->init_mutex);
if (hsotg->driver) { if (hsotg->driver) {
...@@ -3712,6 +3715,9 @@ int s3c_hsotg_resume(struct dwc2_hsotg *hsotg) ...@@ -3712,6 +3715,9 @@ int s3c_hsotg_resume(struct dwc2_hsotg *hsotg)
unsigned long flags; unsigned long flags;
int ret = 0; int ret = 0;
if (hsotg->lx_state == DWC2_L2)
return ret;
mutex_lock(&hsotg->init_mutex); mutex_lock(&hsotg->init_mutex);
if (hsotg->driver) { if (hsotg->driver) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment