Lines Matching refs:policy

36 static void longrun_get_policy(struct cpufreq_policy *policy)  in longrun_get_policy()  argument
43 policy->policy = CPUFREQ_POLICY_PERFORMANCE; in longrun_get_policy()
45 policy->policy = CPUFREQ_POLICY_POWERSAVE; in longrun_get_policy()
54 policy->min = policy->max = longrun_high_freq; in longrun_get_policy()
56 policy->min = longrun_low_freq + msr_lo * in longrun_get_policy()
58 policy->max = longrun_low_freq + msr_hi * in longrun_get_policy()
61 policy->cpu = 0; in longrun_get_policy()
72 static int longrun_set_policy(struct cpufreq_policy *policy) in longrun_set_policy() argument
77 if (!policy) in longrun_set_policy()
84 pctg_lo = (policy->min - longrun_low_freq) / in longrun_set_policy()
86 pctg_hi = (policy->max - longrun_low_freq) / in longrun_set_policy()
98 switch (policy->policy) { in longrun_set_policy()
126 static int longrun_verify_policy(struct cpufreq_policy *policy) in longrun_verify_policy() argument
128 if (!policy) in longrun_verify_policy()
131 policy->cpu = 0; in longrun_verify_policy()
132 cpufreq_verify_within_cpu_limits(policy); in longrun_verify_policy()
134 if ((policy->policy != CPUFREQ_POLICY_POWERSAVE) && in longrun_verify_policy()
135 (policy->policy != CPUFREQ_POLICY_PERFORMANCE)) in longrun_verify_policy()
257 static int longrun_cpu_init(struct cpufreq_policy *policy) in longrun_cpu_init() argument
262 if (policy->cpu != 0) in longrun_cpu_init()
271 policy->cpuinfo.min_freq = longrun_low_freq; in longrun_cpu_init()
272 policy->cpuinfo.max_freq = longrun_high_freq; in longrun_cpu_init()
273 longrun_get_policy(policy); in longrun_cpu_init()