On 11/11/2022 12:24, Johan Hovold wrote:
Runtime PM should be enabled before registering the PHYs, but there is
no reason that the clocks can not be registered before enabling runtime
PM.
This will have a side effect of DP and pipe clocks not using runtime PM
during the clocks operations (see the code handling rpm_enabled in
drivers/clk/clk.c). If this is an intended change, it should be
described in the commit message.
Signed-off-by: Johan Hovold <johan+linaro@xxxxxxxxxx>
---
drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
index 1bc8567a8605..1a6aa61a12c5 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
@@ -2642,6 +2642,14 @@ static int qmp_combo_probe(struct platform_device *pdev)
if (ret)
goto err_node_put;
+ ret = phy_pipe_clk_register(qmp, usb_np);
+ if (ret)
+ goto err_node_put;
+
+ ret = phy_dp_clks_register(qmp, dp_np);
+ if (ret)
+ goto err_node_put;
+
pm_runtime_set_active(dev);
ret = devm_pm_runtime_enable(dev);
if (ret)
@@ -2652,14 +2660,6 @@ static int qmp_combo_probe(struct platform_device *pdev)
*/
pm_runtime_forbid(dev);
- ret = phy_pipe_clk_register(qmp, usb_np);
- if (ret)
- goto err_node_put;
-
- ret = phy_dp_clks_register(qmp, dp_np);
- if (ret)
- goto err_node_put;
-
qmp->usb_phy = devm_phy_create(dev, usb_np, &qmp_combo_usb_phy_ops);
if (IS_ERR(qmp->usb_phy)) {
ret = PTR_ERR(qmp->usb_phy);
--
With best wishes
Dmitry