usb: musb: da8xx: Fix host mode suspend
authorAlexandre Bailon <abailon@baylibre.com>
Thu, 2 Feb 2017 03:30:20 +0000 (21:30 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Feb 2017 09:05:10 +0000 (10:05 +0100)
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.

Use the quirk MUSB_PRESERVE_SESSION to preseve MUSB_DEVCTL during 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>
drivers/usb/musb/da8xx.c

index eb5acee82173ab6286030421ca5e0e30250cc430..d79c288ccbf2db0fcb08f04ad0678cad343503b4 100644 (file)
@@ -457,7 +457,7 @@ static inline u8 get_vbus_power(struct device *dev)
 }
 
 static const struct musb_platform_ops da8xx_ops = {
-       .quirks         = MUSB_INDEXED_EP,
+       .quirks         = MUSB_INDEXED_EP | MUSB_PRESERVE_SESSION,
        .init           = da8xx_musb_init,
        .exit           = da8xx_musb_exit,