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

1 // SPDX-License-Identifier: GPL-2.0-only
57 "cpu-rear-fan-0",
58 "cpu-rear-fan-1",
59 "cpu-front-fan-0",
60 "cpu-front-fan-1",
61 "cpu-pump-0",
62 "cpu-pump-1",
67 #define CPU_FANS_REQD (NR_CPU_FANS - 2)
74 /* Scale factor for fan speed, *100 */
117 #define LOW_OVER_CLEAR ((-10) << 16)
139 tmax = fvt->maxtemp << 16; in create_cpu_loop()
153 return -EINVAL; in create_cpu_loop()
158 * Darwin has a minimum fan speed of 1000 rpm for the 4-way and in create_cpu_loop()
159 * 515 for the 2-way. That appears to be overkill, so for now, in create_cpu_loop()
166 pid.history_len = piddata->history_len; in create_cpu_loop()
167 pid.gd = piddata->gd; in create_cpu_loop()
168 pid.gp = piddata->gp; in create_cpu_loop()
169 pid.gr = piddata->gr / piddata->history_len; in create_cpu_loop()
170 pid.pmaxadj = (piddata->max_power << 16) - (piddata->power_adj << 8); in create_cpu_loop()
171 pid.ttarget = tmax - (piddata->target_temp_delta << 16); in create_cpu_loop()
173 pid.min = main_fan->ops->get_min(main_fan); in create_cpu_loop()
174 pid.max = main_fan->ops->get_max(main_fan); in create_cpu_loop()
189 /* We max all CPU fans in case of a sensor error. We also do the in cpu_max_all_fans()
219 /* We calculate a history of max temperatures and use that for the in cpu_check_overtemp()
225 cpu_thist_total -= t_old; in cpu_check_overtemp()
251 /* High overtemp -> immediate shutdown */ in cpu_check_overtemp()
280 err = sr->ops->get_value(sr, &temp); in cpu_fans_tick()
291 t_max = max(t_max, temp); in cpu_fans_tick()
295 err = sr->ops->get_value(sr, &power); in cpu_fans_tick()
309 if (cpu == 0 || sp->last_delta > greatest_delta) { in cpu_fans_tick()
310 greatest_delta = sp->last_delta; in cpu_fans_tick()
319 if (target < (cpu_last_target - 20)) in cpu_fans_tick()
320 target = cpu_last_target - 20; in cpu_fans_tick()
334 err = ct->ops->set_value(ct, target * cpu_fan_scale[i] / 100); in cpu_fans_tick()
337 "error %d\n", ct->name, err); in cpu_fans_tick()
358 int speed; in backside_fan_tick() local
366 backside_param.min = backside_fan->ops->get_min(backside_fan); in backside_fan_tick()
367 backside_param.max = backside_fan->ops->get_max(backside_fan); in backside_fan_tick()
371 if (--backside_tick > 0) in backside_fan_tick()
375 err = u4_temp->ops->get_value(u4_temp, &temp); in backside_fan_tick()
383 speed = wf_pid_run(&backside_pid, temp); in backside_fan_tick()
384 DBG_LOTS("backside PID temp=%d.%.3d speed=%d\n", in backside_fan_tick()
385 FIX32TOPRINT(temp), speed); in backside_fan_tick()
387 err = backside_fan->ops->set_value(backside_fan, speed); in backside_fan_tick()
408 int speed; in drive_bay_fan_tick() local
416 drive_bay_prm.min = drive_bay_fan->ops->get_min(drive_bay_fan); in drive_bay_fan_tick()
417 drive_bay_prm.max = drive_bay_fan->ops->get_max(drive_bay_fan); in drive_bay_fan_tick()
421 if (--drive_bay_tick > 0) in drive_bay_fan_tick()
425 err = hd_temp->ops->get_value(hd_temp, &temp); in drive_bay_fan_tick()
433 speed = wf_pid_run(&drive_bay_pid, temp); in drive_bay_fan_tick()
434 DBG_LOTS("drive_bay PID temp=%d.%.3d speed=%d\n", in drive_bay_fan_tick()
435 FIX32TOPRINT(temp), speed); in drive_bay_fan_tick()
437 err = drive_bay_fan->ops->set_value(drive_bay_fan, speed); in drive_bay_fan_tick()
445 /* This makes the fan speed proportional to the power consumed */
454 .max = 3510,
460 int speed; in slots_fan_tick() local
472 err = slots_power->ops->get_value(slots_power, &power); in slots_fan_tick()
480 speed = wf_pid_run(&slots_pid, power); in slots_fan_tick()
481 DBG_LOTS("slots PID power=%d.%.3d speed=%d\n", in slots_fan_tick()
482 FIX32TOPRINT(power), speed); in slots_fan_tick()
484 err = slots_fan->ops->set_value(slots_fan, speed); in slots_fan_tick()
560 if (cpufreq_clamp == NULL && !strcmp(ct->name, "cpufreq-clamp")) { in pm112_new_control()
566 if (!strcmp(ct->name, cpu_fan_names[i])) { in pm112_new_control()
574 if (!strcmp(ct->name, "backside-fan")) { in pm112_new_control()
577 } else if (!strcmp(ct->name, "slots-fan")) { in pm112_new_control()
580 } else if (!strcmp(ct->name, "drive-bay-fan")) { in pm112_new_control()
592 max_exhaust = cpu_fans[0]->ops->get_max(cpu_fans[0]); in pm112_new_control()
596 ct->ops->get_max(ct) * 100 / max_exhaust; in pm112_new_control()
605 if (!strncmp(sr->name, "cpu-temp-", 9)) { in pm112_new_sensor()
606 i = sr->name[9] - '0'; in pm112_new_sensor()
607 if (sr->name[10] == 0 && i < NR_CORES && in pm112_new_sensor()
611 } else if (!strncmp(sr->name, "cpu-power-", 10)) { in pm112_new_sensor()
612 i = sr->name[10] - '0'; in pm112_new_sensor()
613 if (sr->name[11] == 0 && i < NR_CORES && in pm112_new_sensor()
616 } else if (!strcmp(sr->name, "hd-temp")) { in pm112_new_sensor()
619 } else if (!strcmp(sr->name, "slots-power")) { in pm112_new_sensor()
622 } else if (!strcmp(sr->name, "backside-temp")) { in pm112_new_sensor()
683 return -ENODEV; in wf_pm112_init()
690 printk(KERN_INFO "windfarm: initializing for dual-core desktop G5\n"); in wf_pm112_init()