diff options
author | Grazvydas Ignotas <notasas@gmail.com> | 2013-03-17 19:23:21 +0100 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-03-21 13:20:28 +0100 |
commit | 44a50d088aad18a1a2709091bf25a108f967f8c9 (patch) | |
tree | 1d2d516e8a86fd30d21469f9dc8e66cb4c061144 | |
parent | arm: tegra: fix Kconfig select clauses (diff) | |
download | linux-44a50d088aad18a1a2709091bf25a108f967f8c9.tar.xz linux-44a50d088aad18a1a2709091bf25a108f967f8c9.zip |
usb: phy: twl4030-usb: don't enable PHY during init
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>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to '')
-rw-r--r-- | drivers/usb/phy/phy-twl4030-usb.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/usb/phy/phy-twl4030-usb.c b/drivers/usb/phy/phy-twl4030-usb.c index 1986c782346f..4ad234cc6c9e 100644 --- a/drivers/usb/phy/phy-twl4030-usb.c +++ b/drivers/usb/phy/phy-twl4030-usb.c @@ -515,19 +515,17 @@ static int twl4030_usb_phy_init(struct usb_phy *phy) struct twl4030_usb *twl = phy_to_twl(phy); 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"); return 0; } |