Lines Matching refs:param
25 void wf_pid_init(struct wf_pid_state *st, struct wf_pid_param *param) in wf_pid_init() argument
28 st->param = *param; in wf_pid_init()
37 int i, hlen = st->param.history_len; in wf_pid_run()
40 error = new_sample - st->param.itarget; in wf_pid_run()
59 integ *= st->param.interval; in wf_pid_run()
64 deriv /= st->param.interval; in wf_pid_run()
67 target = (s32)((integ * (s64)st->param.gr + deriv * (s64)st->param.gd + in wf_pid_run()
68 error * (s64)st->param.gp) >> 36); in wf_pid_run()
69 if (st->param.additive) in wf_pid_run()
71 target = max(target, st->param.min); in wf_pid_run()
72 target = min(target, st->param.max); in wf_pid_run()
80 struct wf_cpu_pid_param *param) in wf_cpu_pid_init() argument
83 st->param = *param; in wf_cpu_pid_init()
92 int i, hlen = st->param.history_len; in wf_cpu_pid_run()
95 error = st->param.pmaxadj - new_power; in wf_cpu_pid_run()
117 integ *= st->param.interval; in wf_cpu_pid_run()
118 integ *= st->param.gr; in wf_cpu_pid_run()
119 sval = st->param.tmax - (s32)(integ >> 20); in wf_cpu_pid_run()
120 adj = min(st->param.ttarget, sval); in wf_cpu_pid_run()
127 deriv /= st->param.interval; in wf_cpu_pid_run()
128 deriv *= st->param.gd; in wf_cpu_pid_run()
132 prop *= st->param.gp; in wf_cpu_pid_run()
138 target = max(target, st->param.min); in wf_cpu_pid_run()
139 target = min(target, st->param.max); in wf_cpu_pid_run()