mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
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 commiteb82a3d846(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:eb82a3d846Signed-off-by: Oussama Ghorbel <[email protected]> Tested-by: Rabin Vincent <[email protected]> Signed-off-by: Kishon Vijay Abraham I <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
a88098bdb2
commit
f20531a9aa
1 changed files with 4 additions and 2 deletions
|
|
@ -258,14 +258,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)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue