[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <052c4937ce408a01de5cd7d7e359d333f9b11e57.1653564321.git.viresh.kumar@linaro.org>
Date: Thu, 26 May 2022 17:12:09 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Chanwoo Choi <cw00.choi@...sung.com>,
MyungJoo Ham <myungjoo.ham@...sung.com>,
Kyungmin Park <kyungmin.park@...sung.com>,
Krzysztof Kozlowski <krzk@...nel.org>,
Alim Akhtar <alim.akhtar@...sung.com>
Cc: Viresh Kumar <viresh.kumar@...aro.org>, linux-pm@...r.kernel.org,
Vincent Guittot <vincent.guittot@...aro.org>,
Rafael Wysocki <rjw@...ysocki.net>,
Stephen Boyd <sboyd@...nel.org>, Nishanth Menon <nm@...com>,
Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
linux-samsung-soc@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: [PATCH 10/31] devfreq: exynos: 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@...aro.org>
---
drivers/devfreq/exynos-bus.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c
index e689101abc93..780e525eb92a 100644
--- a/drivers/devfreq/exynos-bus.c
+++ b/drivers/devfreq/exynos-bus.c
@@ -161,7 +161,7 @@ static void exynos_bus_exit(struct device *dev)
dev_pm_opp_of_remove_table(dev);
clk_disable_unprepare(bus->clk);
- dev_pm_opp_put_regulators(bus->opp_table);
+ dev_pm_opp_clear_config(bus->opp_table);
bus->opp_table = NULL;
}
@@ -182,11 +182,15 @@ static int exynos_bus_parent_parse_of(struct device_node *np,
struct opp_table *opp_table;
const char *vdd = "vdd";
int i, ret, count, size;
+ struct dev_pm_opp_config config = {
+ .regulator_names = &vdd,
+ .regulator_count = 1,
+ };
- opp_table = dev_pm_opp_set_regulators(dev, &vdd, 1);
+ opp_table = dev_pm_opp_set_config(dev, &config);
if (IS_ERR(opp_table)) {
ret = PTR_ERR(opp_table);
- dev_err(dev, "failed to set regulators %d\n", ret);
+ dev_err(dev, "failed to set OPP config %d\n", ret);
return ret;
}
@@ -236,7 +240,7 @@ static int exynos_bus_parent_parse_of(struct device_node *np,
return 0;
err_regulator:
- dev_pm_opp_put_regulators(bus->opp_table);
+ dev_pm_opp_clear_config(bus->opp_table);
bus->opp_table = NULL;
return ret;
@@ -459,7 +463,7 @@ static int exynos_bus_probe(struct platform_device *pdev)
dev_pm_opp_of_remove_table(dev);
clk_disable_unprepare(bus->clk);
err_reg:
- dev_pm_opp_put_regulators(bus->opp_table);
+ dev_pm_opp_clear_config(bus->opp_table);
bus->opp_table = NULL;
return ret;
--
2.31.1.272.g89b43f80a514
Powered by blists - more mailing lists