From: Oussama Ghorbel <ghorbel@pivasoftware.com>
To: Kishon Vijay Abraham I <kishon@ti.com>
Cc: Rabin Vincent <rabin@rab.in>,
rogerq@ti.com, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org,
Oussama Ghorbel <ghorbel@pivasoftware.com>
Subject: [PATCHv2] phy: omap-usb2: Enable runtime PM of omap-usb2 phy properly
Date: Tue, 7 Oct 2014 12:02:51 +0100 [thread overview]
Message-ID: <1412679771-8293-1-git-send-email-ghorbel@pivasoftware.com> (raw)
In-Reply-To: <20141006194418.GA399@debian>
The USB OTG port does not work since v3.16 on omap platform.
This is a regression introduced by the commit
eb82a3d846fa (phy: omap-usb2: Balance pm_runtime_enable() on probe failure
and remove).
This because the call to pm_runtime_enable() function is moved after the
call to devm_phy_create() function, which has side effect since later in
the subsequent calls of devm_phy_create() there is a check with
pm_runtime_enabled() to configure few things.
Signed-off-by: Oussama Ghorbel <ghorbel@pivasoftware.com>
---
drivers/phy/phy-omap-usb2.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/phy/phy-omap-usb2.c b/drivers/phy/phy-omap-usb2.c
index 93d7835..acc13f8 100644
--- a/drivers/phy/phy-omap-usb2.c
+++ b/drivers/phy/phy-omap-usb2.c
@@ -262,14 +262,16 @@ static int omap_usb2_probe(struct platform_device *pdev)
otg->phy = &phy->phy;
platform_set_drvdata(pdev, phy);
+ pm_runtime_enable(phy->dev);
generic_phy = devm_phy_create(phy->dev, NULL, &ops, NULL);
- if (IS_ERR(generic_phy))
+ if (IS_ERR(generic_phy)) {
+ pm_runtime_disable(phy->dev);
return PTR_ERR(generic_phy);
+ }
phy_set_drvdata(generic_phy, phy);
- pm_runtime_enable(phy->dev);
phy_provider = devm_of_phy_provider_register(phy->dev,
of_phy_simple_xlate);
if (IS_ERR(phy_provider)) {
--
1.8.3.2
next prev parent reply other threads:[~2014-10-07 11:04 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-24 16:15 [PATCH] " Oussama Ghorbel
2014-09-26 13:17 ` Oussama Ghorbel
2014-10-06 19:44 ` Rabin Vincent
2014-10-07 11:02 ` Oussama Ghorbel [this message]
2014-10-07 17:11 ` [PATCHv2] " Rabin Vincent
2014-10-08 8:17 ` Roger Quadros
2014-10-08 10:54 ` Oussama Ghorbel
2014-10-08 11:42 ` Roger Quadros
2014-10-08 13:26 ` Greg KH
2014-10-08 13:50 ` Oussama Ghorbel
2014-10-29 23:09 ` Rabin Vincent
2014-10-30 5:16 ` Kishon Vijay Abraham I
2014-11-03 11:21 ` Kishon Vijay Abraham I
2014-11-03 23:29 ` Greg KH
2014-11-11 15:10 ` Enric Balletbo Serra
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=1412679771-8293-1-git-send-email-ghorbel@pivasoftware.com \
--to=ghorbel@pivasoftware.com \
--cc=kishon@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=rabin@rab.in \
--cc=rogerq@ti.com \
/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
all inboxes | Powered by JetHome®