Re: [PATCH 11/13] devfreq: tegra30: Migrate to dev_pm_opp_set_opp()
From: Viresh Kumar <viresh.kumar@linaro.org>
Date: 2021-01-22 06:29:04
Also in:
linux-arm-kernel, linux-pm, lkml
From: Viresh Kumar <viresh.kumar@linaro.org>
Date: 2021-01-22 06:29:04
Also in:
linux-arm-kernel, linux-pm, lkml
On 22-01-21, 00:36, Dmitry Osipenko wrote:
21.01.2021 14:17, Viresh Kumar пишет:quoted
dev_pm_opp_set_bw() is getting removed and dev_pm_opp_set_opp() should be used instead. Migrate to the new API. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> --- drivers/devfreq/tegra30-devfreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)diff --git a/drivers/devfreq/tegra30-devfreq.c b/drivers/devfreq/tegra30-devfreq.c index 117cad7968ab..d2477d7d1f66 100644 --- a/drivers/devfreq/tegra30-devfreq.c +++ b/drivers/devfreq/tegra30-devfreq.c@@ -647,7 +647,7 @@ static int tegra_devfreq_target(struct device *dev, unsigned long *freq, return PTR_ERR(opp); } - ret = dev_pm_opp_set_bw(dev, opp); + ret = dev_pm_opp_set_opp(dev, opp); dev_pm_opp_put(opp); return ret;This patch introduces a very serious change that needs to be fixed. Now dev_pm_opp_set_opp() changes both clock rate and bandwidth, this is unacceptable for this driver because it shall not touch the clock rate. I think dev_pm_opp_set_bw() can't be removed.
I am wondering here on what would be a better solution, do what you said or introduce another helper like dev_pm_opp_clear_clk(), which will make sure the OPP core doesn't play with device's clk. -- viresh