Lines Matching refs:policy

50 static ssize_t show_total_trans(struct cpufreq_policy *policy, char *buf)  in show_total_trans()  argument
52 return sprintf(buf, "%d\n", policy->stats->total_trans); in show_total_trans()
55 static ssize_t show_time_in_state(struct cpufreq_policy *policy, char *buf) in show_time_in_state() argument
57 struct cpufreq_stats *stats = policy->stats; in show_time_in_state()
61 if (policy->fast_switch_enabled) in show_time_in_state()
73 static ssize_t store_reset(struct cpufreq_policy *policy, const char *buf, in store_reset() argument
77 cpufreq_stats_clear_table(policy->stats); in store_reset()
81 static ssize_t show_trans_table(struct cpufreq_policy *policy, char *buf) in show_trans_table() argument
83 struct cpufreq_stats *stats = policy->stats; in show_trans_table()
87 if (policy->fast_switch_enabled) in show_trans_table()
154 void cpufreq_stats_free_table(struct cpufreq_policy *policy) in cpufreq_stats_free_table() argument
156 struct cpufreq_stats *stats = policy->stats; in cpufreq_stats_free_table()
164 sysfs_remove_group(&policy->kobj, &stats_attr_group); in cpufreq_stats_free_table()
167 policy->stats = NULL; in cpufreq_stats_free_table()
170 void cpufreq_stats_create_table(struct cpufreq_policy *policy) in cpufreq_stats_create_table() argument
177 count = cpufreq_table_count_valid_entries(policy); in cpufreq_stats_create_table()
182 if (policy->stats) in cpufreq_stats_create_table()
205 cpufreq_for_each_valid_entry(pos, policy->freq_table) in cpufreq_stats_create_table()
211 stats->last_index = freq_table_get_index(stats, policy->cur); in cpufreq_stats_create_table()
213 policy->stats = stats; in cpufreq_stats_create_table()
214 ret = sysfs_create_group(&policy->kobj, &stats_attr_group); in cpufreq_stats_create_table()
219 policy->stats = NULL; in cpufreq_stats_create_table()
225 void cpufreq_stats_record_transition(struct cpufreq_policy *policy, in cpufreq_stats_record_transition() argument
228 struct cpufreq_stats *stats = policy->stats; in cpufreq_stats_record_transition()