summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorTony Lindgren2016-05-31 17:05:09 +0200
committerGreg Kroah-Hartman2016-06-01 23:58:59 +0200
commit7e1704dcf6b0a895f99e386ccc9ca631117e6d5b (patch)
tree24d2ed214a40b5a3ec655a4a54803c1ecb90fe77 /drivers/usb
parentusb: musb: sunxi: Set state to A_WAIT_VRISE when enabling Vbus (diff)
downloadkernel-qcow2-linux-7e1704dcf6b0a895f99e386ccc9ca631117e6d5b.tar.gz
kernel-qcow2-linux-7e1704dcf6b0a895f99e386ccc9ca631117e6d5b.tar.xz
kernel-qcow2-linux-7e1704dcf6b0a895f99e386ccc9ca631117e6d5b.zip
usb: musb: Fix idling after host mode by increasing autosuspend delay
Looks like at least 2430 glue won't idle reliably with the 200 ms autosuspend delay. This causes deeper idle states being blocked for the whole SoC when disconnecting OTG A cable. Increasing the delay to 500 ms seems to idle both MUSB and the PHY reliably. This is probably because of time needed by the hardware based negotiation between MUSB and the PHY. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/musb/musb_core.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 39fd95833eb8..460176c43e84 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -2028,9 +2028,15 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
musb_readl = musb_default_readl;
musb_writel = musb_default_writel;
- /* We need musb_read/write functions initialized for PM */
+ /*
+ * We need musb_read/write functions initialized for PM.
+ * Note that at least 2430 glue needs autosuspend delay
+ * somewhere above 300 ms for the hardware to idle properly
+ * after disconnecting the cable in host mode. Let's use
+ * 500 ms for some margin.
+ */
pm_runtime_use_autosuspend(musb->controller);
- pm_runtime_set_autosuspend_delay(musb->controller, 200);
+ pm_runtime_set_autosuspend_delay(musb->controller, 500);
pm_runtime_enable(musb->controller);
/* The musb_platform_init() call: