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>, Grazvydas Ignotas <notasas@gmail.com>
Subject: [PATCH 1/7] usb: otg: twl4030-usb: don't enable PHY during init
Date: Sun, 10 Mar 2013 03:07:55 +0200 [thread overview]
Message-ID: <1362877681-8102-2-git-send-email-notasas@gmail.com> (raw)
In-Reply-To: <1362877681-8102-1-git-send-email-notasas@gmail.com>
There is no need to do it, otg.set_suspend(false) (which itself
comes from runtime_pm OMAP glue calls) will enable it later anyway.
This used to be the place where things were enabled if booted with
cable connected before runtime_pm conversion, but now can be dropped.
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
---
drivers/usb/otg/twl4030-usb.c | 23 +++++++++--------------
1 file changed, 9 insertions(+), 14 deletions(-)
diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/twl4030-usb.c
index a994715..1515c0b 100644
--- a/drivers/usb/otg/twl4030-usb.c
+++ b/drivers/usb/otg/twl4030-usb.c
@@ -522,19 +522,17 @@ static void twl4030_usb_phy_init(struct twl4030_usb *twl)
{
enum omap_musb_vbus_id_status status;
- status = twl4030_usb_linkstat(twl);
- if (status > 0) {
- if (status == OMAP_MUSB_VBUS_OFF ||
- status == OMAP_MUSB_ID_FLOAT) {
- __twl4030_phy_power(twl, 0);
- twl->asleep = 1;
- } else {
- __twl4030_phy_resume(twl);
- twl->asleep = 0;
- }
+ /*
+ * Start in sleep state, we'll get called through set_suspend()
+ * callback when musb is runtime resumed and it's time to start.
+ */
+ __twl4030_phy_power(twl, 0);
+ twl->asleep = 1;
+ status = twl4030_usb_linkstat(twl);
+ if (status > 0)
omap_musb_mailbox(twl->linkstat);
- }
+
sysfs_notify(&twl->dev->kobj, NULL, "vbus");
}
@@ -649,9 +647,6 @@ static int twl4030_usb_probe(struct platform_device *pdev)
return status;
}
- /* Power down phy or make it work according to
- * current link state.
- */
twl4030_usb_phy_init(twl);
dev_info(&pdev->dev, "Initialized TWL4030 USB module\n");
--
1.7.9.5
next prev parent reply other threads:[~2013-03-10 1:16 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-10 1:07 [PATCH 0/7] usb: otg: twl4030-usb fixes Grazvydas Ignotas
2013-03-10 1:07 ` Grazvydas Ignotas [this message]
2013-03-10 1:07 ` [PATCH 2/7] usb: otg: twl4030-usb: ignore duplicate events Grazvydas Ignotas
2013-03-12 13:32 ` kishon
2013-03-12 14:55 ` Grazvydas Ignotas
2013-03-10 1:07 ` [PATCH 3/7] usb: otg: twl4030-usb: don't switch the phy on/off needlessly Grazvydas Ignotas
2013-03-10 1:07 ` [PATCH 4/7] usb: otg: twl4030-usb: poll for ID disconnect Grazvydas Ignotas
[not found] ` <1362877681-8102-5-git-send-email-notasas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-03-10 11:03 ` Michael Trimarchi
2013-03-10 14:49 ` Grazvydas Ignotas
2013-03-10 1:07 ` [PATCH 5/7] usb: otg: twl4030-usb: check if vbus is driven by twl itself Grazvydas Ignotas
2013-03-10 1:08 ` [PATCH 6/7] usb: musb: omap2430: turn off vbus on cable disconnect Grazvydas Ignotas
2013-03-12 13:37 ` kishon
[not found] ` <513F2F7C.3040803-l0cyMroinI0@public.gmane.org>
2013-03-12 15:03 ` Grazvydas Ignotas
[not found] ` <1362877681-8102-1-git-send-email-notasas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-03-10 1:08 ` [PATCH 7/7] usb: musb: gadget: use platform callback to enable vbus Grazvydas Ignotas
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=1362877681-8102-2-git-send-email-notasas@gmail.com \
--to=notasas@gmail.com \
--cc=balbi@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).