diff options
author | Sekhar Nori <nsekhar@ti.com> | 2015-08-31 21:09:08 +0530 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2015-09-27 10:54:31 -0500 |
commit | 6344475f53977d329ec50f49805fd4ab83df4011 (patch) | |
tree | 765b8bead47e91272576f650c218d81382b96cd1 /drivers/usb/dwc3 | |
parent | 9e44d194b90b2d9e6e26cd0381db856fa7cd7e19 (diff) | |
download | linux-6344475f53977d329ec50f49805fd4ab83df4011.tar.gz linux-6344475f53977d329ec50f49805fd4ab83df4011.tar.bz2 linux-6344475f53977d329ec50f49805fd4ab83df4011.zip |
usb: dwc3: support for pinctrl state change during system sleep
Add support for USB DRVVBUS pinctrl state change during
suspend/resume. This helps is conserving power during
system sleep.
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc3')
-rw-r--r-- | drivers/usb/dwc3/core.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 6270581fc7a9..cfbcebe2cf8f 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -34,6 +34,7 @@ #include <linux/dma-mapping.h> #include <linux/of.h> #include <linux/acpi.h> +#include <linux/pinctrl/consumer.h> #include <linux/usb/ch9.h> #include <linux/usb/gadget.h> @@ -1125,6 +1126,8 @@ static int dwc3_suspend(struct device *dev) phy_exit(dwc->usb2_generic_phy); phy_exit(dwc->usb3_generic_phy); + pinctrl_pm_select_sleep_state(dev); + return 0; } @@ -1134,6 +1137,8 @@ static int dwc3_resume(struct device *dev) unsigned long flags; int ret; + pinctrl_pm_select_default_state(dev); + usb_phy_init(dwc->usb3_phy); usb_phy_init(dwc->usb2_phy); ret = phy_init(dwc->usb2_generic_phy); |