All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: musb: Disable pullup in gadget setup
@ 2019-04-04  9:37 ` Paul Cercueil
  0 siblings, 0 replies; 9+ messages in thread
From: Paul Cercueil @ 2019-04-04  9:37 UTC (permalink / raw)
  To: Bin Liu; +Cc: od, linux-usb, linux-kernel, Paul Cercueil

The pullup may be already enabled before the driver is initialized.
It has to be disabled at init time, as we cannot guarantee that a gadget
driver will be bound to the UDC.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
 drivers/usb/musb/musb_gadget.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
index ffe462a657b1..094dc59c834c 100644
--- a/drivers/usb/musb/musb_gadget.c
+++ b/drivers/usb/musb/musb_gadget.c
@@ -1794,6 +1794,7 @@ int musb_gadget_setup(struct musb *musb)
 
 	musb->is_active = 0;
 	musb_platform_try_idle(musb, 0);
+	musb_pullup(musb, 0);
 
 	status = usb_add_gadget_udc(musb->controller, &musb->g);
 	if (status)
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-07-15  6:05 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-04  9:37 [PATCH] usb: musb: Disable pullup in gadget setup Paul Cercueil
2019-04-04  9:37 ` Paul Cercueil
2019-04-04 16:10 ` [PATCH] " Bin Liu
2019-04-04 16:10   ` Bin Liu
2019-04-30 15:05   ` [PATCH] " Bin Liu
2019-04-30 15:05     ` Bin Liu
2019-04-30 15:10     ` [PATCH] " Bin Liu
2019-04-30 15:10       ` Bin Liu
2019-07-15  6:05     ` [PATCH] " Paul Cercueil

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.