aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3/dwc3-omap.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/dwc3/dwc3-omap.c')
-rw-r--r--drivers/usb/dwc3/dwc3-omap.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c
index a0aa9f3da441..172d64e585b6 100644
--- a/drivers/usb/dwc3/dwc3-omap.c
+++ b/drivers/usb/dwc3/dwc3-omap.c
@@ -593,27 +593,12 @@ static const struct of_device_id of_dwc3_match[] = {
593MODULE_DEVICE_TABLE(of, of_dwc3_match); 593MODULE_DEVICE_TABLE(of, of_dwc3_match);
594 594
595#ifdef CONFIG_PM_SLEEP 595#ifdef CONFIG_PM_SLEEP
596static int dwc3_omap_prepare(struct device *dev)
597{
598 struct dwc3_omap *omap = dev_get_drvdata(dev);
599
600 dwc3_omap_disable_irqs(omap);
601
602 return 0;
603}
604
605static void dwc3_omap_complete(struct device *dev)
606{
607 struct dwc3_omap *omap = dev_get_drvdata(dev);
608
609 dwc3_omap_enable_irqs(omap);
610}
611
612static int dwc3_omap_suspend(struct device *dev) 596static int dwc3_omap_suspend(struct device *dev)
613{ 597{
614 struct dwc3_omap *omap = dev_get_drvdata(dev); 598 struct dwc3_omap *omap = dev_get_drvdata(dev);
615 599
616 omap->utmi_otg_status = dwc3_omap_read_utmi_status(omap); 600 omap->utmi_otg_status = dwc3_omap_read_utmi_status(omap);
601 dwc3_omap_disable_irqs(omap);
617 602
618 return 0; 603 return 0;
619} 604}
@@ -623,6 +608,7 @@ static int dwc3_omap_resume(struct device *dev)
623 struct dwc3_omap *omap = dev_get_drvdata(dev); 608 struct dwc3_omap *omap = dev_get_drvdata(dev);
624 609
625 dwc3_omap_write_utmi_status(omap, omap->utmi_otg_status); 610 dwc3_omap_write_utmi_status(omap, omap->utmi_otg_status);
611 dwc3_omap_enable_irqs(omap);
626 612
627 pm_runtime_disable(dev); 613 pm_runtime_disable(dev);
628 pm_runtime_set_active(dev); 614 pm_runtime_set_active(dev);
@@ -632,8 +618,6 @@ static int dwc3_omap_resume(struct device *dev)
632} 618}
633 619
634static const struct dev_pm_ops dwc3_omap_dev_pm_ops = { 620static const struct dev_pm_ops dwc3_omap_dev_pm_ops = {
635 .prepare = dwc3_omap_prepare,
636 .complete = dwc3_omap_complete,
637 621
638 SET_SYSTEM_SLEEP_PM_OPS(dwc3_omap_suspend, dwc3_omap_resume) 622 SET_SYSTEM_SLEEP_PM_OPS(dwc3_omap_suspend, dwc3_omap_resume)
639}; 623};