Commit ea9364bb authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

cpufreq: Add strict_target to struct cpufreq_policy

Add a new field to be set when the CPUFREQ_GOV_STRICT_TARGET flag is
set for the current governor to struct cpufreq_policy, so that the
drivers needing to check CPUFREQ_GOV_STRICT_TARGET do not have to
access the governor object during every frequency transition.
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
parent 218f6687
...@@ -2280,6 +2280,8 @@ static int cpufreq_init_governor(struct cpufreq_policy *policy) ...@@ -2280,6 +2280,8 @@ static int cpufreq_init_governor(struct cpufreq_policy *policy)
} }
} }
policy->strict_target = !!(policy->governor->flags & CPUFREQ_GOV_STRICT_TARGET);
return 0; return 0;
} }
......
...@@ -109,6 +109,12 @@ struct cpufreq_policy { ...@@ -109,6 +109,12 @@ struct cpufreq_policy {
bool fast_switch_possible; bool fast_switch_possible;
bool fast_switch_enabled; bool fast_switch_enabled;
/*
* Set if the CPUFREQ_GOV_STRICT_TARGET flag is set for the current
* governor.
*/
bool strict_target;
/* /*
* Preferred average time interval between consecutive invocations of * Preferred average time interval between consecutive invocations of
* the driver to set the frequency for this policy. To be set by the * the driver to set the frequency for this policy. To be set by the
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment