lkml.org 
[lkml]   [2022]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH V2 11/30] devfreq: sun8i: Migrate to dev_pm_opp_set_config()
Date
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>
---
drivers/devfreq/sun8i-a33-mbus.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/devfreq/sun8i-a33-mbus.c b/drivers/devfreq/sun8i-a33-mbus.c
index 13d32213139f..0dcc13cae7d7 100644
--- a/drivers/devfreq/sun8i-a33-mbus.c
+++ b/drivers/devfreq/sun8i-a33-mbus.c
@@ -337,6 +337,10 @@ static int sun8i_a33_mbus_probe(struct platform_device *pdev)
unsigned int max_state;
const char *err;
int i, ret;
+ struct dev_pm_opp_config config = {
+ .clk_names = (const char *[]){ "dram" },
+ .clk_count = 1,
+ };

variant = device_get_match_data(dev);
if (!variant)
@@ -404,9 +408,9 @@ static int sun8i_a33_mbus_probe(struct platform_device *pdev)
priv->profile.freq_table = priv->freq_table;
priv->profile.max_state = max_state;

- ret = devm_pm_opp_set_clkname(dev, "dram");
+ ret = devm_pm_opp_set_config(dev, &config);
if (ret) {
- err = "failed to add OPP table\n";
+ err = "failed to set OPP config\n";
goto err_unlock_mbus;
}

--
2.31.1.272.g89b43f80a514
\
 
 \ /
  Last update: 2022-07-01 10:23    [W:0.335 / U:0.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site