Lines Matching refs:dtpm
24 struct dtpm dtpm; member
29 static struct dtpm_devfreq *to_dtpm_devfreq(struct dtpm *dtpm) in to_dtpm_devfreq() argument
31 return container_of(dtpm, struct dtpm_devfreq, dtpm); in to_dtpm_devfreq()
34 static int update_pd_power_uw(struct dtpm *dtpm) in update_pd_power_uw() argument
36 struct dtpm_devfreq *dtpm_devfreq = to_dtpm_devfreq(dtpm); in update_pd_power_uw()
41 dtpm->power_min = pd->table[0].power; in update_pd_power_uw()
42 dtpm->power_min *= MICROWATT_PER_MILLIWATT; in update_pd_power_uw()
44 dtpm->power_max = pd->table[pd->nr_perf_states - 1].power; in update_pd_power_uw()
45 dtpm->power_max *= MICROWATT_PER_MILLIWATT; in update_pd_power_uw()
50 static u64 set_pd_power_limit(struct dtpm *dtpm, u64 power_limit) in set_pd_power_limit() argument
52 struct dtpm_devfreq *dtpm_devfreq = to_dtpm_devfreq(dtpm); in set_pd_power_limit()
90 static u64 get_pd_power_uw(struct dtpm *dtpm) in get_pd_power_uw() argument
92 struct dtpm_devfreq *dtpm_devfreq = to_dtpm_devfreq(dtpm); in get_pd_power_uw()
123 static void pd_release(struct dtpm *dtpm) in pd_release() argument
125 struct dtpm_devfreq *dtpm_devfreq = to_dtpm_devfreq(dtpm); in pd_release()
140 static int __dtpm_devfreq_setup(struct devfreq *devfreq, struct dtpm *parent) in __dtpm_devfreq_setup()
160 dtpm_init(&dtpm_devfreq->dtpm, &dtpm_ops); in __dtpm_devfreq_setup()
164 ret = dtpm_register(dev_name(dev), &dtpm_devfreq->dtpm, parent); in __dtpm_devfreq_setup()
179 dtpm_update_power(&dtpm_devfreq->dtpm); in __dtpm_devfreq_setup()
184 dtpm_unregister(&dtpm_devfreq->dtpm); in __dtpm_devfreq_setup()
189 static int dtpm_devfreq_setup(struct dtpm *dtpm, struct device_node *np) in dtpm_devfreq_setup() argument
197 return __dtpm_devfreq_setup(devfreq, dtpm); in dtpm_devfreq_setup()