Lines Matching defs:dtpm
22 #include <linux/dtpm.h>
29 struct dtpm dtpm;
36 static struct dtpm_cpu *to_dtpm_cpu(struct dtpm *dtpm)
38 return container_of(dtpm, struct dtpm_cpu, dtpm);
41 static u64 set_pd_power_limit(struct dtpm *dtpm, u64 power_limit)
43 struct dtpm_cpu *dtpm_cpu = to_dtpm_cpu(dtpm);
87 static u64 get_pd_power_uw(struct dtpm *dtpm)
89 struct dtpm_cpu *dtpm_cpu = to_dtpm_cpu(dtpm);
112 static int update_pd_power_uw(struct dtpm *dtpm)
114 struct dtpm_cpu *dtpm_cpu = to_dtpm_cpu(dtpm);
122 dtpm->power_min = em->table[0].power;
123 dtpm->power_min *= nr_cpus;
125 dtpm->power_max = em->table[em->nr_perf_states - 1].power;
126 dtpm->power_max *= nr_cpus;
131 static void pd_release(struct dtpm *dtpm)
133 struct dtpm_cpu *dtpm_cpu = to_dtpm_cpu(dtpm);
163 dtpm_update_power(&dtpm_cpu->dtpm);
174 return dtpm_update_power(&dtpm_cpu->dtpm);
179 static int __dtpm_cpu_setup(int cpu, struct dtpm *parent)
207 dtpm_init(&dtpm_cpu->dtpm, &dtpm_ops);
215 ret = dtpm_register(name, &dtpm_cpu->dtpm, parent);
229 dtpm_unregister(&dtpm_cpu->dtpm);
242 static int dtpm_cpu_setup(struct dtpm *dtpm, struct device_node *np)
250 return __dtpm_cpu_setup(cpu, dtpm);