Lines Matching defs:dtpm
16 #include <linux/dtpm.h>
24 struct dtpm dtpm;
29 static struct dtpm_devfreq *to_dtpm_devfreq(struct dtpm *dtpm)
31 return container_of(dtpm, struct dtpm_devfreq, dtpm);
34 static int update_pd_power_uw(struct dtpm *dtpm)
36 struct dtpm_devfreq *dtpm_devfreq = to_dtpm_devfreq(dtpm);
41 dtpm->power_min = pd->table[0].power;
43 dtpm->power_max = pd->table[pd->nr_perf_states - 1].power;
48 static u64 set_pd_power_limit(struct dtpm *dtpm, u64 power_limit)
50 struct dtpm_devfreq *dtpm_devfreq = to_dtpm_devfreq(dtpm);
85 static u64 get_pd_power_uw(struct dtpm *dtpm)
87 struct dtpm_devfreq *dtpm_devfreq = to_dtpm_devfreq(dtpm);
118 static void pd_release(struct dtpm *dtpm)
120 struct dtpm_devfreq *dtpm_devfreq = to_dtpm_devfreq(dtpm);
135 static int __dtpm_devfreq_setup(struct devfreq *devfreq, struct dtpm *parent)
155 dtpm_init(&dtpm_devfreq->dtpm, &dtpm_ops);
159 ret = dtpm_register(dev_name(dev), &dtpm_devfreq->dtpm, parent);
174 dtpm_update_power(&dtpm_devfreq->dtpm);
179 dtpm_unregister(&dtpm_devfreq->dtpm);
184 static int dtpm_devfreq_setup(struct dtpm *dtpm, struct device_node *np)
192 return __dtpm_devfreq_setup(devfreq, dtpm);