Skip to content

Commit

Permalink
Merge tag 'devfreq-next-for-6.1' of git://git.kernel.org/pub/scm/linu…
Browse files Browse the repository at this point in the history
…x/kernel/git/chanwoo/linux

Pull devfreq next for v6.1 from Chanwoo Choi:

"1. Handle -EPROBE_DEFER when regulator is not probed on mtk-ci-devfreq.c
 2. Use dev_err_probe to reduce the error log on rockchip-dfi.c"

* tag 'devfreq-next-for-6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux:
  PM / devfreq: rockchip-dfi: Fix an error message
  PM / devfreq: mtk-cci: Handle sram regulator probe deferral
  • Loading branch information
Rafael J. Wysocki committed Sep 28, 2022
2 parents f76349c + fb2ac84 commit 599618e
Showing 2 changed files with 9 additions and 6 deletions.
7 changes: 3 additions & 4 deletions drivers/devfreq/event/rockchip-dfi.c
Original file line number Diff line number Diff line change
@@ -189,10 +189,9 @@ static int rockchip_dfi_probe(struct platform_device *pdev)
return PTR_ERR(data->regs);

data->clk = devm_clk_get(dev, "pclk_ddr_mon");
if (IS_ERR(data->clk)) {
dev_err(dev, "Cannot get the clk dmc_clk\n");
return PTR_ERR(data->clk);
}
if (IS_ERR(data->clk))
return dev_err_probe(dev, PTR_ERR(data->clk),
"Cannot get the clk pclk_ddr_mon\n");

/* try to find the optional reference to the pmu syscon */
node = of_parse_phandle(np, "rockchip,pmu", 0);
8 changes: 6 additions & 2 deletions drivers/devfreq/mtk-cci-devfreq.c
Original file line number Diff line number Diff line change
@@ -291,9 +291,13 @@ static int mtk_ccifreq_probe(struct platform_device *pdev)
}

drv->sram_reg = devm_regulator_get_optional(dev, "sram");
if (IS_ERR(drv->sram_reg))
if (IS_ERR(drv->sram_reg)) {
ret = PTR_ERR(drv->sram_reg);
if (ret == -EPROBE_DEFER)
goto out_free_resources;

drv->sram_reg = NULL;
else {
} else {
ret = regulator_enable(drv->sram_reg);
if (ret) {
dev_err(dev, "failed to enable sram regulator\n");

0 comments on commit 599618e

Please sign in to comment.