Skip to content

Commit f8981b0

Browse files
committed
Merge tag 'qcom-clk-fixes-for-6.9' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into clk-fixes
Pull Qualcomm clk driver fixes from Bjorn Andersson: The introduction of support for the external VDD_GFX supply in SA8295P ADP unearthed a lockdep problem in the GDSC code w.r.t regulator supplies. Make the regulator optional, to avoid creating a dummy regulator, on those boards that doesn't use this. While not solving the root cause of the problem, it reduces the impact of the lockdep warning - and it avoids wasting resources. Refactoring of the RPM clock driver accidentally removed num_clks from msm8976. Reintroduce this to get the clocks back. * tag 'qcom-clk-fixes-for-6.9' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: clk: qcom: smd-rpm: Restore msm8976 num_clk clk: qcom: gdsc: treat optional supplies as optional
2 parents d3e8a91 + 0d4ce24 commit f8981b0

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

drivers/clk/qcom/clk-smd-rpm.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -768,6 +768,7 @@ static struct clk_smd_rpm *msm8976_clks[] = {
768768

769769
static const struct rpm_smd_clk_desc rpm_clk_msm8976 = {
770770
.clks = msm8976_clks,
771+
.num_clks = ARRAY_SIZE(msm8976_clks),
771772
.icc_clks = bimc_pcnoc_snoc_smmnoc_icc_clks,
772773
.num_icc_clks = ARRAY_SIZE(bimc_pcnoc_snoc_smmnoc_icc_clks),
773774
};

drivers/clk/qcom/gdsc.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -487,9 +487,14 @@ int gdsc_register(struct gdsc_desc *desc,
487487
if (!scs[i] || !scs[i]->supply)
488488
continue;
489489

490-
scs[i]->rsupply = devm_regulator_get(dev, scs[i]->supply);
491-
if (IS_ERR(scs[i]->rsupply))
492-
return PTR_ERR(scs[i]->rsupply);
490+
scs[i]->rsupply = devm_regulator_get_optional(dev, scs[i]->supply);
491+
if (IS_ERR(scs[i]->rsupply)) {
492+
ret = PTR_ERR(scs[i]->rsupply);
493+
if (ret != -ENODEV)
494+
return ret;
495+
496+
scs[i]->rsupply = NULL;
497+
}
493498
}
494499

495500
data->num_domains = num;

0 commit comments

Comments
 (0)