From: Chanwoo Choi <cwchoi00@gmail.com>
To: Viresh Kumar <viresh.kumar@linaro.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Chanwoo Choi <cw00.choi@samsung.com>,
MyungJoo Ham <myungjoo.ham@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
Alim Akhtar <alim.akhtar@samsung.com>, Nishanth Menon <nm@ti.com>,
Stephen Boyd <sboyd@kernel.org>
Cc: linux-pm@vger.kernel.org,
Vincent Guittot <vincent.guittot@linaro.org>,
linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH V3 10/20] OPP: Migrate set-regulators API to use set-config helpers
Date: Fri, 8 Jul 2022 04:29:54 +0900 [thread overview]
Message-ID: <c4f66e4d-727e-254c-2a36-6949813f8031@gmail.com> (raw)
In-Reply-To: <57b3f53e71550be92e28f4e2fa619f93bb5f3d78.1656935522.git.viresh.kumar@linaro.org>
On 22. 7. 4. 21:07, Viresh Kumar wrote:
> Now that we have a central API to handle all OPP table configurations,
> migrate the set-regulators family of helpers to use the new
> infrastructure.
>
> The return type and parameter to the APIs change a bit due to this,
> update the current users as well in the same commit in order to avoid
> breaking builds.
>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
> drivers/cpufreq/cpufreq-dt.c | 12 ++---
> drivers/devfreq/exynos-bus.c | 19 +++-----
> drivers/opp/core.c | 91 ++++++++----------------------------
> include/linux/pm_opp.h | 44 ++++++++++-------
> 4 files changed, 60 insertions(+), 106 deletions(-)
>
(snip)
> diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c
> index 541baff93ee8..d1235242367f 100644
> --- a/drivers/devfreq/exynos-bus.c
> +++ b/drivers/devfreq/exynos-bus.c
> @@ -33,7 +33,7 @@ struct exynos_bus {
>
> unsigned long curr_freq;
>
> - struct opp_table *opp_table;
> + int opp_token;
> struct clk *clk;
> unsigned int ratio;
> };
> @@ -161,8 +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);
> - bus->opp_table = NULL;
> + dev_pm_opp_put_regulators(bus->opp_token);
> }
>
> static void exynos_bus_passive_exit(struct device *dev)
> @@ -179,18 +178,16 @@ static int exynos_bus_parent_parse_of(struct device_node *np,
> struct exynos_bus *bus)
> {
> struct device *dev = bus->dev;
> - struct opp_table *opp_table;
> const char *supplies[] = { "vdd", NULL };
> int i, ret, count, size;
>
> - opp_table = dev_pm_opp_set_regulators(dev, supplies);
> - if (IS_ERR(opp_table)) {
> - ret = PTR_ERR(opp_table);
> + ret = dev_pm_opp_set_regulators(dev, supplies);
> + if (ret < 0) {
> dev_err(dev, "failed to set regulators %d\n", ret);
> return ret;
> }
>
> - bus->opp_table = opp_table;
> + bus->opp_token = ret;
>
> /*
> * Get the devfreq-event devices to get the current utilization of
> @@ -236,8 +233,7 @@ static int exynos_bus_parent_parse_of(struct device_node *np,
> return 0;
>
> err_regulator:
> - dev_pm_opp_put_regulators(bus->opp_table);
> - bus->opp_table = NULL;
> + dev_pm_opp_put_regulators(bus->opp_token);
>
> return ret;
> }
> @@ -459,8 +455,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);
> - bus->opp_table = NULL;
> + dev_pm_opp_put_regulators(bus->opp_token);
>
> return ret;
> }
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Thanks.
(snip)
--
Best Regards,
Samsung Electronics
Chanwoo Choi
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-07-07 19:31 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-04 12:07 [PATCH V3 00/20] OPP: Add new configuration interface: dev_pm_opp_set_config() Viresh Kumar
2022-07-04 12:07 ` [PATCH V3 02/20] OPP: Make dev_pm_opp_set_regulators() accept NULL terminated list Viresh Kumar
2022-07-04 14:35 ` Steven Price
2022-07-05 4:34 ` Viresh Kumar
2022-07-06 8:09 ` Steven Price
2022-07-06 8:18 ` [PATCH V3.1 " Viresh Kumar
2022-07-06 9:50 ` Steven Price
2022-07-07 19:04 ` [PATCH V3 " Chanwoo Choi
2022-07-04 12:07 ` [PATCH V3 05/20] cpufreq: sti: Migrate to dev_pm_opp_set_config() Viresh Kumar
2022-07-04 12:07 ` [PATCH V3 10/20] OPP: Migrate set-regulators API to use set-config helpers Viresh Kumar
2022-07-07 19:29 ` Chanwoo Choi [this message]
2022-07-04 12:07 ` [PATCH V3 11/20] OPP: Migrate set-supported-hw " Viresh Kumar
2022-07-04 12:07 ` [PATCH V3 15/20] OPP: Migrate set-prop-name helper " Viresh Kumar
2022-07-04 18:59 ` Samuel Holland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c4f66e4d-727e-254c-2a36-6949813f8031@gmail.com \
--to=cwchoi00@gmail.com \
--cc=alim.akhtar@samsung.com \
--cc=cw00.choi@samsung.com \
--cc=krzysztof.kozlowski@linaro.org \
--cc=kyungmin.park@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=myungjoo.ham@samsung.com \
--cc=nm@ti.com \
--cc=rafael@kernel.org \
--cc=sboyd@kernel.org \
--cc=vincent.guittot@linaro.org \
--cc=viresh.kumar@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).