summaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/musb_core.c
diff options
context:
space:
mode:
authorAlexandre Bailon <abailon@baylibre.com>2017-02-01 21:30:19 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-02-03 10:05:10 +0100
commita926ed11e7b4325f0ece739d7188e8bdbb99fb44 (patch)
tree3d63577f6d347261ef824bdde14985332665a5cd /drivers/usb/musb/musb_core.c
parent71f5a0ad9e82c1239f0d748bda32a4b6e6dbcb80 (diff)
downloadlinux-stable-a926ed11e7b4325f0ece739d7188e8bdbb99fb44.tar.gz
linux-stable-a926ed11e7b4325f0ece739d7188e8bdbb99fb44.tar.bz2
linux-stable-a926ed11e7b4325f0ece739d7188e8bdbb99fb44.zip
usb: musb: Add a quirk to preserve the session during suspend
On da8xx, VBUS is not maintained during suspend when musb is in host mode. On resume, all the connected devices will be disconnected and then will be enumerated again. This happens because MUSB_DEVCTL is cleared during suspend. Add a quirk to not clear MUSB_DEVCTL and then preserve the session during a suspend. Signed-off-by: Alexandre Bailon <abailon@baylibre.com> Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/musb/musb_core.c')
-rw-r--r--drivers/usb/musb/musb_core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index b1f082f42112..27887189fd14 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -2659,7 +2659,8 @@ static int musb_suspend(struct device *dev)
musb_platform_disable(musb);
musb_disable_interrupts(musb);
- musb_writeb(musb->mregs, MUSB_DEVCTL, 0);
+ if (!(musb->io.quirks & MUSB_PRESERVE_SESSION))
+ musb_writeb(musb->mregs, MUSB_DEVCTL, 0);
WARN_ON(!list_empty(&musb->pending_list));
spin_lock_irqsave(&musb->lock, flags);