From: Grazvydas Ignotas <notasas@gmail.com>
To: linux-usb@vger.kernel.org
Cc: linux-omap@vger.kernel.org, Felipe Balbi <balbi@ti.com>,
NeilBrown <neilb@suse.de>, kishon <kishon@ti.com>,
Grazvydas Ignotas <notasas@gmail.com>
Subject: [PATCHv2 7/7] usb: musb: gadget: use platform callback to enable vbus
Date: Sun, 17 Mar 2013 20:23:27 +0200 [thread overview]
Message-ID: <1363544607-17634-8-git-send-email-notasas@gmail.com> (raw)
In-Reply-To: <1363544607-17634-1-git-send-email-notasas@gmail.com>
On some platform configurations (like OMAP3+twl4030) it's the platform
code that enables VBUS, not OTG transceiver, so call vbus platform
callback instead, it will then call the transceiver if needed.
This fixes a use case where USB cable is plugged first and gadget
driver is loaded later after that.
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
---
drivers/usb/musb/musb_gadget.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
index ae59ee6..60eef20 100644
--- a/drivers/usb/musb/musb_gadget.c
+++ b/drivers/usb/musb/musb_gadget.c
@@ -1799,9 +1799,8 @@ static int musb_gadget_start(struct usb_gadget *g,
goto err;
}
- if ((musb->xceiv->last_event == USB_EVENT_ID)
- && otg->set_vbus)
- otg_set_vbus(otg, 1);
+ if (musb->xceiv->last_event == USB_EVENT_ID)
+ musb_platform_set_vbus(musb, 1);
hcd->self.uses_pio_for_control = 1;
--
1.7.9.5
prev parent reply other threads:[~2013-03-17 18:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-17 18:23 [PATCHv2 0/7] usb: phy: twl4030-usb fixes Grazvydas Ignotas
2013-03-17 18:23 ` [PATCHv2 3/7] usb: phy: twl4030-usb: don't switch the phy on/off needlessly Grazvydas Ignotas
[not found] ` <1363544607-17634-1-git-send-email-notasas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-03-17 18:23 ` [PATCHv2 1/7] usb: phy: twl4030-usb: don't enable PHY during init Grazvydas Ignotas
2013-03-17 18:23 ` [PATCHv2 2/7] usb: phy: twl4030-usb: ignore duplicate events Grazvydas Ignotas
2013-03-17 18:23 ` [PATCHv2 4/7] usb: phy: twl4030-usb: poll for ID disconnect Grazvydas Ignotas
2013-03-17 18:23 ` [PATCHv2 5/7] usb: phy: twl4030-usb: check if vbus is driven by twl itself Grazvydas Ignotas
[not found] ` <1363544607-17634-6-git-send-email-notasas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-03-20 13:07 ` Felipe Balbi
[not found] ` <20130320130750.GR29659-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
2013-03-21 13:42 ` Grazvydas Ignotas
[not found] ` <CANOLnOOS6X95ijodL903zqLn3emNZ-rDX0xrxYQUXFJ1PR-PZw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-03-21 16:43 ` Felipe Balbi
2013-03-20 12:54 ` [PATCHv2 0/7] usb: phy: twl4030-usb fixes Felipe Balbi
[not found] ` <20130320125425.GQ29659-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
2013-03-20 13:08 ` Felipe Balbi
2013-03-17 18:23 ` [PATCHv2 6/7] usb: musb: omap2430: turn off vbus on cable disconnect Grazvydas Ignotas
2013-03-17 18:23 ` Grazvydas Ignotas [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1363544607-17634-8-git-send-email-notasas@gmail.com \
--to=notasas@gmail.com \
--cc=balbi@ti.com \
--cc=kishon@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=neilb@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).