Lines Matching +full:max +full:- +full:speed

1 // SPDX-License-Identifier: GPL-2.0-only
93 #define LOW_OVER_CLEAR ((-10) << 16)
103 /* We max all CPU fans in case of a sensor error. We also do the in cpu_max_all_fans()
155 * We calculate a history of max temperatures and use that for the in cpu_check_overtemp()
161 cpu_thist_total -= t_old; in cpu_check_overtemp()
187 /* High overtemp -> immediate shutdown */ in cpu_check_overtemp()
211 return -EIO; in read_one_cpu_vals()
220 return -EIO; in read_one_cpu_vals()
228 return -EIO; in read_one_cpu_vals()
248 s32 speed, temp, power, t_max = 0; in cpu_fans_tick() local
255 /* Read current speed */ in cpu_fans_tick()
256 wf_control_get(cpu_fans[cpu][0], &sp->target); in cpu_fans_tick()
266 t_max = max(t_max, temp); in cpu_fans_tick()
275 DBG_LOTS(" CPU%d: target = %d RPM\n", cpu, sp->target); in cpu_fans_tick()
278 speed = max(sp->target, dimms_output_clamp); in cpu_fans_tick()
282 err = wf_control_set(cpu_fans[cpu][i], speed); in cpu_fans_tick()
285 cpu_fans[cpu][i]->name, err); in cpu_fans_tick()
301 tmax = mpu->tmax << 16; in cpu_setup_pid()
302 ttarget = mpu->ttarget << 16; in cpu_setup_pid()
303 ptarget = ((s32)(mpu->pmaxh - mpu->padjmax)) << 16; in cpu_setup_pid()
312 /* Set PID min/max by using the rear fan min/max */ in cpu_setup_pid()
315 DBG("wf_72: CPU%d max RPM range = [%d..%d]\n", cpu, fmin, fmax); in cpu_setup_pid()
318 hsize = min_t(int, mpu->tguardband, WF_PID_MAX_HISTORY); in cpu_setup_pid()
324 pid.gd = mpu->pid_gd; in cpu_setup_pid()
325 pid.gp = mpu->pid_gp; in cpu_setup_pid()
326 pid.gr = mpu->pid_gr; in cpu_setup_pid()
331 pid.max = fmax; in cpu_setup_pid()
349 .max = 100,
362 .max = 14000,
368 int speed, dspeed, fan_min; in backside_fan_tick() local
373 if (--backside_tick > 0) in backside_fan_tick()
379 /* Update fan speed from actual fans */ in backside_fan_tick()
380 err = wf_control_get(backside_fan, &speed); in backside_fan_tick()
382 backside_pid.target = speed; in backside_fan_tick()
392 speed = wf_pid_run(&backside_pid, temp); in backside_fan_tick()
394 DBG_LOTS("backside PID temp=%d.%.3d speed=%d\n", in backside_fan_tick()
395 FIX32TOPRINT(temp), speed); in backside_fan_tick()
409 fan_min = max(fan_min, backside_param.min); in backside_fan_tick()
410 speed = max(speed, fan_min); in backside_fan_tick()
412 err = wf_control_set(backside_fan, speed); in backside_fan_tick()
427 param.min = max(param.min, fmin); in backside_setup_pid()
428 param.max = min(param.max, fmax); in backside_setup_pid()
449 .max = 100,
455 int speed; in slots_fan_tick() local
460 if (--slots_tick > 0) in slots_fan_tick()
473 speed = wf_pid_run(&slots_pid, temp); in slots_fan_tick()
475 DBG_LOTS("slots PID temp=%d.%.3d speed=%d\n", in slots_fan_tick()
476 FIX32TOPRINT(temp), speed); in slots_fan_tick()
478 slots_speed = speed; in slots_fan_tick()
479 err = wf_control_set(slots_fan, speed); in slots_fan_tick()
493 param.min = max(param.min, fmin); in slots_setup_pid()
494 param.max = min(param.max, fmax); in slots_setup_pid()
571 if (!strcmp(ct->name, "cpu-fan-a-0")) in rm31_new_control()
573 else if (!strcmp(ct->name, "cpu-fan-b-0")) in rm31_new_control()
575 else if (!strcmp(ct->name, "cpu-fan-c-0")) in rm31_new_control()
577 else if (!strcmp(ct->name, "cpu-fan-a-1")) in rm31_new_control()
579 else if (!strcmp(ct->name, "cpu-fan-b-1")) in rm31_new_control()
581 else if (!strcmp(ct->name, "cpu-fan-c-1")) in rm31_new_control()
583 else if (!strcmp(ct->name, "backside-fan")) in rm31_new_control()
585 else if (!strcmp(ct->name, "slots-fan")) in rm31_new_control()
587 else if (!strcmp(ct->name, "cpufreq-clamp")) in rm31_new_control()
609 if (!strcmp(sr->name, "cpu-diode-temp-0")) in rm31_new_sensor()
611 else if (!strcmp(sr->name, "cpu-diode-temp-1")) in rm31_new_sensor()
613 else if (!strcmp(sr->name, "cpu-voltage-0")) in rm31_new_sensor()
615 else if (!strcmp(sr->name, "cpu-voltage-1")) in rm31_new_sensor()
617 else if (!strcmp(sr->name, "cpu-current-0")) in rm31_new_sensor()
619 else if (!strcmp(sr->name, "cpu-current-1")) in rm31_new_sensor()
621 else if (!strcmp(sr->name, "backside-temp")) in rm31_new_sensor()
623 else if (!strcmp(sr->name, "slots-temp")) in rm31_new_sensor()
625 else if (!strcmp(sr->name, "dimms-temp")) in rm31_new_sensor()
693 return -ENODEV; in wf_rm31_init()
710 return -ENXIO; in wf_rm31_init()