[PATCH] opp: convert dev_warn() to dev_dbg() for duplicate OPPs
Viresh Kumar
viresh.kumar at linaro.org
Tue Nov 18 23:46:24 PST 2014
On 19 November 2014 02:21, Rafael J. Wysocki <rjw at rjwysocki.net> wrote:
> On Tuesday, November 18, 2014 08:38:14 AM Viresh Kumar wrote:
>> We are allowing addition of duplicate OPPs as a standard thing right now
>> as cpufreq drivers don't get rid of the OPPs they create with DT. So, that
>> shouldn't complain, isn't it ?
>
> Is cpufreq the only user of OPP? I thought there were other users, so what
> about them?
Probably of CPU OPPs, but I am not sure. Obviously dev OPPs can be used
by others.
> I'm not sure about that. If they aren't useful for anything after
> that, what's the benefit of keeping them around?
I don't think they are of any use once the driver is gone, unless the driver is
inserted again.
So, this is what we can do to distinguish DT OPPs with other dynamic ones:
diff --git a/drivers/base/power/opp.c b/drivers/base/power/opp.c
index 490e9db..7e25f01 100644
--- a/drivers/base/power/opp.c
+++ b/drivers/base/power/opp.c
@@ -49,6 +49,7 @@
* are protected by the dev_opp_list_lock for integrity.
* IMPORTANT: the opp nodes should be maintained in increasing
* order.
+ * @from_dt: created from static DT entries.
* @available: true/false - marks if this OPP as available or not
* @rate: Frequency in hertz
* @u_volt: Nominal voltage in microvolts corresponding to this OPP
@@ -61,6 +62,7 @@ struct dev_pm_opp {
struct list_head node;
bool available;
+ bool from_dt;
unsigned long rate;
unsigned long u_volt;
Does this look fine? I can then write of_free_opp_table(), opposite of
of_init_opp_table().
More information about the linux-arm-kernel
mailing list