Skip to content

Commit

Permalink
clk: qcom: mss-sc7180: fix missing resume during probe
Browse files Browse the repository at this point in the history
Drivers that enable runtime PM must make sure that the controller is
runtime resumed before accessing its registers to prevent the power
domain from being disabled.

Fixes: 8def929 ("clk: qcom: Add modem clock controller driver for SC7180")
Cc: stable@vger.kernel.org      # 5.7
Cc: Taniya Das <quic_tdas@quicinc.com>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20230718132902.21430-8-johan+linaro@kernel.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
  • Loading branch information
Johan Hovold authored and Bjorn Andersson committed Jul 18, 2023
1 parent 97112c8 commit e2349da
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion drivers/clk/qcom/mss-sc7180.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,22 @@ static int mss_sc7180_probe(struct platform_device *pdev)
return ret;
}

ret = pm_runtime_resume_and_get(&pdev->dev);
if (ret)
return ret;

ret = qcom_cc_probe(pdev, &mss_sc7180_desc);
if (ret < 0)
return ret;
goto err_put_rpm;

pm_runtime_put(&pdev->dev);

return 0;

err_put_rpm:
pm_runtime_put_sync(&pdev->dev);

return ret;
}

static const struct dev_pm_ops mss_sc7180_pm_ops = {
Expand Down

0 comments on commit e2349da

Please sign in to comment.