[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210118114451.5mpuvgnhhajx4b3y@vireshk-i7>
Date: Mon, 18 Jan 2021 17:14:51 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Dmitry Osipenko <digetx@...il.com>
Cc: Thierry Reding <thierry.reding@...il.com>,
Jonathan Hunter <jonathanh@...dia.com>,
Mark Brown <broonie@...nel.org>,
Liam Girdwood <lgirdwood@...il.com>,
Ulf Hansson <ulf.hansson@...aro.org>,
Peter Geis <pgwipeout@...il.com>,
Nicolas Chauvet <kwizart@...il.com>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Kevin Hilman <khilman@...nel.org>,
Peter De Schrijver <pdeschrijver@...dia.com>,
Viresh Kumar <vireshk@...nel.org>,
Stephen Boyd <sboyd@...nel.org>, Nishanth Menon <nm@...com>,
Yangtao Li <tiny.windzz@...il.com>,
Matt Merhar <mattmerhar@...tonmail.com>,
linux-kernel@...r.kernel.org, linux-tegra@...r.kernel.org,
linux-pm@...r.kernel.org
Subject: Re: [PATCH v3 10/12] opp: Support set_opp() customization without
requiring to use regulators
On 18-01-21, 03:55, Dmitry Osipenko wrote:
> diff --git a/include/linux/pm_opp.h b/include/linux/pm_opp.h
> index eefd0b15890c..c98fd2add563 100644
> --- a/include/linux/pm_opp.h
> +++ b/include/linux/pm_opp.h
> @@ -13,6 +13,7 @@
>
> #include <linux/energy_model.h>
> #include <linux/err.h>
> +#include <linux/kref.h>
> #include <linux/notifier.h>
>
> struct clk;
> @@ -74,6 +75,7 @@ struct dev_pm_opp_info {
> * @regulator_count: Number of regulators
> * @clk: Pointer to clk
> * @dev: Pointer to the struct device
> + * @kref: Reference counter
> *
> * This structure contains all information required for setting an OPP.
> */
> @@ -85,6 +87,7 @@ struct dev_pm_set_opp_data {
> unsigned int regulator_count;
> struct clk *clk;
> struct device *dev;
> + struct kref kref;
> };
Instead of kref thing, allocate the memory for supplies from
dev_pm_opp_set_regulators() and store it in new entries in opp-table
and for rest of the data from dev_pm_opp_register_set_opp_helper(), to
which you can copy supplies pointers then.
--
viresh
Powered by blists - more mailing lists