diff options
author | Oussama Ghorbel <ghorbel@pivasoftware.com> | 2014-11-04 01:17:06 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-11-05 17:34:06 -0500 |
commit | f20531a9aae0c7378d9fa75b4b5d99b7eecab066 (patch) | |
tree | a78d41e0567f38e0f021c52738da577ebd776054 | |
parent | a88098bdb272fb631a59fb152bfef7c827531294 (diff) |
phy: omap-usb2: Enable runtime PM of omap-usb2 phy properly
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.
Fixes: eb82a3d846fa
Signed-off-by: Oussama Ghorbel <ghorbel@pivasoftware.com>
Tested-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/phy/phy-omap-usb2.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/phy/phy-omap-usb2.c b/drivers/phy/phy-omap-usb2.c index 8c842980834a..f091576b6449 100644 --- a/drivers/phy/phy-omap-usb2.c +++ b/drivers/phy/phy-omap-usb2.c | |||
@@ -258,14 +258,16 @@ static int omap_usb2_probe(struct platform_device *pdev) | |||
258 | otg->phy = &phy->phy; | 258 | otg->phy = &phy->phy; |
259 | 259 | ||
260 | platform_set_drvdata(pdev, phy); | 260 | platform_set_drvdata(pdev, phy); |
261 | pm_runtime_enable(phy->dev); | ||
261 | 262 | ||
262 | generic_phy = devm_phy_create(phy->dev, NULL, &ops, NULL); | 263 | generic_phy = devm_phy_create(phy->dev, NULL, &ops, NULL); |
263 | if (IS_ERR(generic_phy)) | 264 | if (IS_ERR(generic_phy)) { |
265 | pm_runtime_disable(phy->dev); | ||
264 | return PTR_ERR(generic_phy); | 266 | return PTR_ERR(generic_phy); |
267 | } | ||
265 | 268 | ||
266 | phy_set_drvdata(generic_phy, phy); | 269 | phy_set_drvdata(generic_phy, phy); |
267 | 270 | ||
268 | pm_runtime_enable(phy->dev); | ||
269 | phy_provider = devm_of_phy_provider_register(phy->dev, | 271 | phy_provider = devm_of_phy_provider_register(phy->dev, |
270 | of_phy_simple_xlate); | 272 | of_phy_simple_xlate); |
271 | if (IS_ERR(phy_provider)) { | 273 | if (IS_ERR(phy_provider)) { |