summaryrefslogtreecommitdiff
path: root/drivers/usb/dwc2
diff options
context:
space:
mode:
authorGregory Herrero <gregory.herrero@intel.com>2015-04-29 22:09:07 +0200
committerFelipe Balbi <balbi@ti.com>2015-04-29 15:19:14 -0500
commit9e779778ad7e503434aa76bfc96f98d7d7b2d139 (patch)
tree0b918228fc1bf37cba261dea6ae87576be84b035 /drivers/usb/dwc2
parent4876886fb95f93c8b09381ffbdac969d1a1fee0d (diff)
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: John Youn <johnyoun@synopsys.com> Signed-off-by: Gregory Herrero <gregory.herrero@intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc2')
-rw-r--r--drivers/usb/dwc2/gadget.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index f867e954764f..a360f49d3fd0 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -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) {
@@ -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) {