diff options
| author | Johan Hovold <[email protected]> | 2023-07-18 15:29:01 +0200 |
|---|---|---|
| committer | Bjorn Andersson <[email protected]> | 2023-07-18 07:58:50 -0700 |
| commit | e2349da0fa7ca822cda72f427345b95795358fe7 (patch) | |
| tree | 1409383c5735962eaad3ec5b56a968ff27962aa6 | |
| parent | 97112c83f4671a4a722f99a53be4e91fac4091bc (diff) | |
clk: qcom: mss-sc7180: fix missing resume during probe
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: 8def929c4097 ("clk: qcom: Add modem clock controller driver for SC7180")
Cc: [email protected] # 5.7
Cc: Taniya Das <[email protected]>
Signed-off-by: Johan Hovold <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Bjorn Andersson <[email protected]>
| -rw-r--r-- | drivers/clk/qcom/mss-sc7180.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/clk/qcom/mss-sc7180.c b/drivers/clk/qcom/mss-sc7180.c index 5a1407440662..d106bc65470e 100644 --- a/drivers/clk/qcom/mss-sc7180.c +++ b/drivers/clk/qcom/mss-sc7180.c @@ -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 = { |