diff options
| author | Viresh Kumar <viresh.kumar@linaro.org> | 2022-05-25 17:00:51 +0530 |
|---|---|---|
| committer | Viresh Kumar <viresh.kumar@linaro.org> | 2022-06-15 10:53:01 +0530 |
| commit | 95b9dcf95d91f0cbc35137d019fae2cb7313edc7 (patch) | |
| tree | c89530d5d6c3c7b3d739e30f083b9c7d3e3d0a0a /drivers/devfreq | |
| parent | de616d86673013985033c631701739069bf2d924 (diff) | |
| download | linux-next-95b9dcf95d91f0cbc35137d019fae2cb7313edc7.tar.gz linux-next-95b9dcf95d91f0cbc35137d019fae2cb7313edc7.zip | |
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@linaro.org>
Diffstat (limited to 'drivers/devfreq')
| -rw-r--r-- | drivers/devfreq/exynos-bus.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c index e689101abc93..8fca24565e7d 100644 --- a/drivers/devfreq/exynos-bus.c +++ b/drivers/devfreq/exynos-bus.c @@ -161,8 +161,11 @@ 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); - bus->opp_table = NULL; + + if (bus->opp_table) { + dev_pm_opp_clear_config(bus->opp_table); + bus->opp_table = NULL; + } } static void exynos_bus_passive_exit(struct device *dev) @@ -182,11 +185,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 +243,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,8 +466,10 @@ err: dev_pm_opp_of_remove_table(dev); clk_disable_unprepare(bus->clk); err_reg: - dev_pm_opp_put_regulators(bus->opp_table); - bus->opp_table = NULL; + if (bus->opp_table) { + dev_pm_opp_clear_config(bus->opp_table); + bus->opp_table = NULL; + } return ret; } |
