Lines Matching refs:tzp
151 if (!tz->tzp->k_po || force) in estimate_pid_constants()
152 tz->tzp->k_po = int_to_frac(sustainable_power) / in estimate_pid_constants()
155 if (!tz->tzp->k_pu || force) in estimate_pid_constants()
156 tz->tzp->k_pu = int_to_frac(2 * sustainable_power) / in estimate_pid_constants()
159 if (!tz->tzp->k_i || force) in estimate_pid_constants()
160 tz->tzp->k_i = int_to_frac(10) / 1000; in estimate_pid_constants()
196 if (tz->tzp->sustainable_power) { in pid_controller()
197 sustainable_power = tz->tzp->sustainable_power; in pid_controller()
209 p = mul_frac(err < 0 ? tz->tzp->k_po : tz->tzp->k_pu, err); in pid_controller()
217 i = mul_frac(tz->tzp->k_i, params->err_integral); in pid_controller()
219 if (err < int_to_frac(tz->tzp->integral_cutoff)) { in pid_controller()
220 s64 i_next = i + mul_frac(tz->tzp->k_i, err); in pid_controller()
235 d = mul_frac(tz->tzp->k_d, err - params->prev_err); in pid_controller()
553 if (!tz->tzp) { in power_allocator_bind()
554 tz->tzp = kzalloc(sizeof(*tz->tzp), GFP_KERNEL); in power_allocator_bind()
555 if (!tz->tzp) { in power_allocator_bind()
563 if (!tz->tzp->sustainable_power) in power_allocator_bind()
573 estimate_pid_constants(tz, tz->tzp->sustainable_power, in power_allocator_bind()
597 kfree(tz->tzp); in power_allocator_unbind()
598 tz->tzp = NULL; in power_allocator_unbind()