Skip to content

Commit f7c4a46

Browse files
tmlindgregkh
authored andcommitted
phy: twl4030-usb: Fix for musb session bit based PM
Now with musb driver implementing generic session bit based PM, we need to have the USB PHYs behaving in a sane way for platforms implementing PM. Currently twl4030-usb enables PM in twl4030_phy_power_on() and then disables it in twl4030_phy_power_off(). This will block PM runtime for the SoC when no cable is connected. Fix the issue by moving PM runtime autosuspend call to happen where it gets called in twl4030_phy_power_on(). Note that this patch should not be backported to anything before commit 467d5c9 ("usb: musb: Implement session bit based runtime PM for musb-core") as before that all the glue layers implemented their own PM. Fixes: 467d5c9 ("usb: musb: Implement session bit based runtime PM for musb-core") Tested-by: Ladislav Michl <ladis@linux-mips.org> Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Acked-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 2475291 commit f7c4a46

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/phy/phy-twl4030-usb.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,8 +459,6 @@ static int twl4030_phy_power_off(struct phy *phy)
459459
struct twl4030_usb *twl = phy_get_drvdata(phy);
460460

461461
dev_dbg(twl->dev, "%s\n", __func__);
462-
pm_runtime_mark_last_busy(twl->dev);
463-
pm_runtime_put_autosuspend(twl->dev);
464462

465463
return 0;
466464
}
@@ -472,6 +470,8 @@ static int twl4030_phy_power_on(struct phy *phy)
472470
dev_dbg(twl->dev, "%s\n", __func__);
473471
pm_runtime_get_sync(twl->dev);
474472
schedule_delayed_work(&twl->id_workaround_work, HZ);
473+
pm_runtime_mark_last_busy(twl->dev);
474+
pm_runtime_put_autosuspend(twl->dev);
475475

476476
return 0;
477477
}

0 commit comments

Comments
 (0)