Lines Matching refs:tzp
147 tz->tzp->k_po = int_to_frac(sustainable_power) / in estimate_pid_constants()
150 tz->tzp->k_pu = int_to_frac(2 * sustainable_power) / in estimate_pid_constants()
153 k_i = tz->tzp->k_pu / 10; in estimate_pid_constants()
154 tz->tzp->k_i = k_i > 0 ? k_i : 1; in estimate_pid_constants()
179 if (!tz->tzp->sustainable_power) in get_sustainable_power()
182 sustainable_power = tz->tzp->sustainable_power; in get_sustainable_power()
190 tz->tzp->sustainable_power = sustainable_power; in get_sustainable_power()
232 p = mul_frac(err < 0 ? tz->tzp->k_po : tz->tzp->k_pu, err); in pid_controller()
240 i = mul_frac(tz->tzp->k_i, params->err_integral); in pid_controller()
242 if (err < int_to_frac(tz->tzp->integral_cutoff)) { in pid_controller()
243 s64 i_next = i + mul_frac(tz->tzp->k_i, err); in pid_controller()
258 d = mul_frac(tz->tzp->k_d, err - params->prev_err); in pid_controller()
644 if (!tz->tzp) { in power_allocator_bind()
645 tz->tzp = kzalloc(sizeof(*tz->tzp), GFP_KERNEL); in power_allocator_bind()
646 if (!tz->tzp) { in power_allocator_bind()
654 if (!tz->tzp->sustainable_power) in power_allocator_bind()
663 estimate_pid_constants(tz, tz->tzp->sustainable_power, in power_allocator_bind()
687 kfree(tz->tzp); in power_allocator_unbind()
688 tz->tzp = NULL; in power_allocator_unbind()