Skip to content

Commit

Permalink
usb: dwc2: gadget: ignore pm suspend/resume in L2
Browse files Browse the repository at this point in the history
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: John Youn <johnyoun@synopsys.com>
Signed-off-by: Gregory Herrero <gregory.herrero@intel.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Gregory Herrero authored and Felipe Balbi committed Apr 29, 2015
1 parent 4876886 commit 9e77977
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/usb/dwc2/gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -3672,6 +3672,9 @@ int s3c_hsotg_suspend(struct dwc2_hsotg *hsotg)
unsigned long flags;
int ret = 0;

if (hsotg->lx_state != DWC2_L0)
return ret;

mutex_lock(&hsotg->init_mutex);

if (hsotg->driver) {
Expand Down Expand Up @@ -3712,6 +3715,9 @@ int s3c_hsotg_resume(struct dwc2_hsotg *hsotg)
unsigned long flags;
int ret = 0;

if (hsotg->lx_state == DWC2_L2)
return ret;

mutex_lock(&hsotg->init_mutex);

if (hsotg->driver) {
Expand Down

0 comments on commit 9e77977

Please sign in to comment.