Lines Matching refs:tzp
149 tz->tzp->k_po = int_to_frac(sustainable_power) / in estimate_pid_constants()
152 tz->tzp->k_pu = int_to_frac(2 * sustainable_power) / in estimate_pid_constants()
155 k_i = tz->tzp->k_pu / 10; in estimate_pid_constants()
156 tz->tzp->k_i = k_i > 0 ? k_i : 1; in estimate_pid_constants()
181 if (!tz->tzp->sustainable_power) in get_sustainable_power()
184 sustainable_power = tz->tzp->sustainable_power; in get_sustainable_power()
192 tz->tzp->sustainable_power = sustainable_power; in get_sustainable_power()
234 p = mul_frac(err < 0 ? tz->tzp->k_po : tz->tzp->k_pu, err); in pid_controller()
242 i = mul_frac(tz->tzp->k_i, params->err_integral); in pid_controller()
244 if (err < int_to_frac(tz->tzp->integral_cutoff)) { in pid_controller()
245 s64 i_next = i + mul_frac(tz->tzp->k_i, err); in pid_controller()
260 d = mul_frac(tz->tzp->k_d, err - params->prev_err); in pid_controller()
646 if (!tz->tzp) { in power_allocator_bind()
647 tz->tzp = kzalloc(sizeof(*tz->tzp), GFP_KERNEL); in power_allocator_bind()
648 if (!tz->tzp) { in power_allocator_bind()
656 if (!tz->tzp->sustainable_power) in power_allocator_bind()
666 estimate_pid_constants(tz, tz->tzp->sustainable_power, in power_allocator_bind()
690 kfree(tz->tzp); in power_allocator_unbind()
691 tz->tzp = NULL; in power_allocator_unbind()