Skip to content

Commit

Permalink
clk: qcom: q6sstop-qcs404: 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: 6cdef27 ("clk: qcom: Add Q6SSTOP clock controller for QCS404")
Cc: stable@vger.kernel.org      # 5.5
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20230718132902.21430-7-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 66af533 commit 97112c8
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions drivers/clk/qcom/q6sstop-qcs404.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,21 +174,32 @@ static int q6sstopcc_qcs404_probe(struct platform_device *pdev)
return ret;
}

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

q6sstop_regmap_config.name = "q6sstop_tcsr";
desc = &tcsr_qcs404_desc;

ret = qcom_cc_probe_by_index(pdev, 1, desc);
if (ret)
return ret;
goto err_put_rpm;

q6sstop_regmap_config.name = "q6sstop_cc";
desc = &q6sstop_qcs404_desc;

ret = qcom_cc_probe_by_index(pdev, 0, desc);
if (ret)
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 q6sstopcc_pm_ops = {
Expand Down

0 comments on commit 97112c8

Please sign in to comment.