mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
soc: rockchip: opp_select: Fix set scmi clk rate error
Fixes: c64369f0e4 ("soc: rockchip: opp_select: Implements new opp APIs for kernel 6.1")
Change-Id: I1c2e71016bacd846f4146e8036c85f9271a15e93
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
This commit is contained in:
@@ -2119,6 +2119,12 @@ int rockchip_opp_config_clks(struct device *dev, struct opp_table *opp_table,
|
||||
if (!info->is_runtime_active)
|
||||
return 0;
|
||||
|
||||
ret = clk_bulk_prepare_enable(info->nclocks, info->clocks);
|
||||
if (ret) {
|
||||
dev_err(dev, "failed to enable opp clks\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
dev_dbg(dev, "%lu -> %lu (Hz)\n", opp_table->rate_clk_single, *target);
|
||||
ret = clk_set_rate(opp_table->clk, *target);
|
||||
if (ret)
|
||||
@@ -2126,6 +2132,8 @@ int rockchip_opp_config_clks(struct device *dev, struct opp_table *opp_table,
|
||||
else
|
||||
opp_table->rate_clk_single = *target;
|
||||
|
||||
clk_bulk_disable_unprepare(info->nclocks, info->clocks);
|
||||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL(rockchip_opp_config_clks);
|
||||
|
||||
Reference in New Issue
Block a user