summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/lima
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2022-05-25 13:30:51 +0200
committerViresh Kumar <viresh.kumar@linaro.org>2022-07-08 07:57:33 +0200
commitd8c32d3971e4c4f9e81c28031c46b755c17192d2 (patch)
tree973c017de426cbe48b55339e7f9ab6408133e602 /drivers/gpu/drm/lima
parentcpufreq: ti: Migrate to dev_pm_opp_set_config() (diff)
downloadlinux-d8c32d3971e4c4f9e81c28031c46b755c17192d2.tar.xz
linux-d8c32d3971e4c4f9e81c28031c46b755c17192d2.zip
drm/lima: Migrate to dev_pm_opp_set_config()
The OPP core now provides a unified API for setting all configuration types, i.e. dev_pm_opp_set_config(). Lets start using it. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'drivers/gpu/drm/lima')
-rw-r--r--drivers/gpu/drm/lima/lima_devfreq.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/gpu/drm/lima/lima_devfreq.c b/drivers/gpu/drm/lima/lima_devfreq.c
index dc83c5421125..011be7ff51e1 100644
--- a/drivers/gpu/drm/lima/lima_devfreq.c
+++ b/drivers/gpu/drm/lima/lima_devfreq.c
@@ -112,6 +112,11 @@ int lima_devfreq_init(struct lima_device *ldev)
unsigned long cur_freq;
int ret;
const char *regulator_names[] = { "mali", NULL };
+ const char *clk_names[] = { "core", NULL };
+ struct dev_pm_opp_config config = {
+ .regulator_names = regulator_names,
+ .clk_names = clk_names,
+ };
if (!device_property_present(dev, "operating-points-v2"))
/* Optional, continue without devfreq */
@@ -119,11 +124,7 @@ int lima_devfreq_init(struct lima_device *ldev)
spin_lock_init(&ldevfreq->lock);
- ret = devm_pm_opp_set_clkname(dev, "core");
- if (ret)
- return ret;
-
- ret = devm_pm_opp_set_regulators(dev, regulator_names);
+ ret = devm_pm_opp_set_config(dev, &config);
if (ret) {
/* Continue if the optional regulator is missing */
if (ret != -ENODEV)