Lines Matching refs:dtpm
30 struct dtpm dtpm; member
37 static struct dtpm_cpu *to_dtpm_cpu(struct dtpm *dtpm) in to_dtpm_cpu() argument
39 return container_of(dtpm, struct dtpm_cpu, dtpm); in to_dtpm_cpu()
42 static u64 set_pd_power_limit(struct dtpm *dtpm, u64 power_limit) in set_pd_power_limit() argument
44 struct dtpm_cpu *dtpm_cpu = to_dtpm_cpu(dtpm); in set_pd_power_limit()
88 static u64 get_pd_power_uw(struct dtpm *dtpm) in get_pd_power_uw() argument
90 struct dtpm_cpu *dtpm_cpu = to_dtpm_cpu(dtpm); in get_pd_power_uw()
114 static int update_pd_power_uw(struct dtpm *dtpm) in update_pd_power_uw() argument
116 struct dtpm_cpu *dtpm_cpu = to_dtpm_cpu(dtpm); in update_pd_power_uw()
124 dtpm->power_min = em->table[0].power; in update_pd_power_uw()
125 dtpm->power_min *= MICROWATT_PER_MILLIWATT; in update_pd_power_uw()
126 dtpm->power_min *= nr_cpus; in update_pd_power_uw()
128 dtpm->power_max = em->table[em->nr_perf_states - 1].power; in update_pd_power_uw()
129 dtpm->power_max *= MICROWATT_PER_MILLIWATT; in update_pd_power_uw()
130 dtpm->power_max *= nr_cpus; in update_pd_power_uw()
135 static void pd_release(struct dtpm *dtpm) in pd_release() argument
137 struct dtpm_cpu *dtpm_cpu = to_dtpm_cpu(dtpm); in pd_release()
165 dtpm_update_power(&dtpm_cpu->dtpm); in cpuhp_dtpm_cpu_offline()
176 return dtpm_update_power(&dtpm_cpu->dtpm); in cpuhp_dtpm_cpu_online()
181 static int __dtpm_cpu_setup(int cpu, struct dtpm *parent) in __dtpm_cpu_setup()
205 dtpm_init(&dtpm_cpu->dtpm, &dtpm_ops); in __dtpm_cpu_setup()
213 ret = dtpm_register(name, &dtpm_cpu->dtpm, parent); in __dtpm_cpu_setup()
226 dtpm_unregister(&dtpm_cpu->dtpm); in __dtpm_cpu_setup()
237 static int dtpm_cpu_setup(struct dtpm *dtpm, struct device_node *np) in dtpm_cpu_setup() argument
245 return __dtpm_cpu_setup(cpu, dtpm); in dtpm_cpu_setup()