Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a926ed11 authored by Alexandre Bailon's avatar Alexandre Bailon Committed by Greg Kroah-Hartman
Browse files

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: default avatarAlexandre Bailon <abailon@baylibre.com>
Signed-off-by: default avatarBin Liu <b-liu@ti.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 71f5a0ad
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2659,6 +2659,7 @@ static int musb_suspend(struct device *dev)

	musb_platform_disable(musb);
	musb_disable_interrupts(musb);
	if (!(musb->io.quirks & MUSB_PRESERVE_SESSION))
		musb_writeb(musb->mregs, MUSB_DEVCTL, 0);
	WARN_ON(!list_empty(&musb->pending_list));

+1 −0
Original line number Diff line number Diff line
@@ -172,6 +172,7 @@ struct musb_io;
 */
struct musb_platform_ops {

#define MUSB_PRESERVE_SESSION	BIT(7)
#define MUSB_DMA_UX500		BIT(6)
#define MUSB_DMA_CPPI41		BIT(5)
#define MUSB_DMA_CPPI		BIT(4)