mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-26 04:20:23 +09:00
clk: qcom: turingcc-qcs404: fix missing resume during probe
commita9f71a0335upstream. 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:892df0191b("clk: qcom: Add QCS404 TuringCC") Cc: stable@vger.kernel.org # 5.2 Cc: Bjorn Andersson <andersson@kernel.org> Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20230718132902.21430-9-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
9f5db4ab19
commit
2d8138cea7
@@ -124,11 +124,22 @@ static int turingcc_probe(struct platform_device *pdev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = qcom_cc_probe(pdev, &turingcc_desc);
|
||||
if (ret < 0)
|
||||
ret = pm_runtime_resume_and_get(&pdev->dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = qcom_cc_probe(pdev, &turingcc_desc);
|
||||
if (ret < 0)
|
||||
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 turingcc_pm_ops = {
|
||||
|
||||
Reference in New Issue
Block a user