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

1 // SPDX-License-Identifier: GPL-2.0-only
59 "cpu-rear-fan-0",
60 "cpu-rear-fan-1",
61 "cpu-front-fan-0",
62 "cpu-front-fan-1",
63 "cpu-pump-0",
64 "cpu-pump-1",
69 #define CPU_FANS_REQD (NR_CPU_FANS - 2)
76 /* Scale factor for fan speed, *100 */
119 #define LOW_OVER_CLEAR ((-10) << 16)
141 tmax = fvt->maxtemp << 16; in create_cpu_loop()
155 return -EINVAL; in create_cpu_loop()
160 * Darwin has a minimum fan speed of 1000 rpm for the 4-way and in create_cpu_loop()
161 * 515 for the 2-way. That appears to be overkill, so for now, in create_cpu_loop()
168 pid.history_len = piddata->history_len; in create_cpu_loop()
169 pid.gd = piddata->gd; in create_cpu_loop()
170 pid.gp = piddata->gp; in create_cpu_loop()
171 pid.gr = piddata->gr / piddata->history_len; in create_cpu_loop()
172 pid.pmaxadj = (piddata->max_power << 16) - (piddata->power_adj << 8); in create_cpu_loop()
173 pid.ttarget = tmax - (piddata->target_temp_delta << 16); in create_cpu_loop()
175 pid.min = main_fan->ops->get_min(main_fan); in create_cpu_loop()
176 pid.max = main_fan->ops->get_max(main_fan); in create_cpu_loop()
191 /* We max all CPU fans in case of a sensor error. We also do the in cpu_max_all_fans()
221 /* We calculate a history of max temperatures and use that for the in cpu_check_overtemp()
227 cpu_thist_total -= t_old; in cpu_check_overtemp()
253 /* High overtemp -> immediate shutdown */ in cpu_check_overtemp()
282 err = sr->ops->get_value(sr, &temp); in cpu_fans_tick()
293 t_max = max(t_max, temp); in cpu_fans_tick()
297 err = sr->ops->get_value(sr, &power); in cpu_fans_tick()
311 if (cpu == 0 || sp->last_delta > greatest_delta) { in cpu_fans_tick()
312 greatest_delta = sp->last_delta; in cpu_fans_tick()
321 if (target < (cpu_last_target - 20)) in cpu_fans_tick()
322 target = cpu_last_target - 20; in cpu_fans_tick()
336 err = ct->ops->set_value(ct, target * cpu_fan_scale[i] / 100); in cpu_fans_tick()
339 "error %d\n", ct->name, err); in cpu_fans_tick()
360 int speed; in backside_fan_tick() local
368 backside_param.min = backside_fan->ops->get_min(backside_fan); in backside_fan_tick()
369 backside_param.max = backside_fan->ops->get_max(backside_fan); in backside_fan_tick()
373 if (--backside_tick > 0) in backside_fan_tick()
377 err = u4_temp->ops->get_value(u4_temp, &temp); in backside_fan_tick()
385 speed = wf_pid_run(&backside_pid, temp); in backside_fan_tick()
386 DBG_LOTS("backside PID temp=%d.%.3d speed=%d\n", in backside_fan_tick()
387 FIX32TOPRINT(temp), speed); in backside_fan_tick()
389 err = backside_fan->ops->set_value(backside_fan, speed); in backside_fan_tick()
410 int speed; in drive_bay_fan_tick() local
418 drive_bay_prm.min = drive_bay_fan->ops->get_min(drive_bay_fan); in drive_bay_fan_tick()
419 drive_bay_prm.max = drive_bay_fan->ops->get_max(drive_bay_fan); in drive_bay_fan_tick()
423 if (--drive_bay_tick > 0) in drive_bay_fan_tick()
427 err = hd_temp->ops->get_value(hd_temp, &temp); in drive_bay_fan_tick()
435 speed = wf_pid_run(&drive_bay_pid, temp); in drive_bay_fan_tick()
436 DBG_LOTS("drive_bay PID temp=%d.%.3d speed=%d\n", in drive_bay_fan_tick()
437 FIX32TOPRINT(temp), speed); in drive_bay_fan_tick()
439 err = drive_bay_fan->ops->set_value(drive_bay_fan, speed); in drive_bay_fan_tick()
447 /* This makes the fan speed proportional to the power consumed */
456 .max = 3510,
462 int speed; in slots_fan_tick() local
474 err = slots_power->ops->get_value(slots_power, &power); in slots_fan_tick()
482 speed = wf_pid_run(&slots_pid, power); in slots_fan_tick()
483 DBG_LOTS("slots PID power=%d.%.3d speed=%d\n", in slots_fan_tick()
484 FIX32TOPRINT(power), speed); in slots_fan_tick()
486 err = slots_fan->ops->set_value(slots_fan, speed); in slots_fan_tick()
562 if (cpufreq_clamp == NULL && !strcmp(ct->name, "cpufreq-clamp")) { in pm112_new_control()
568 if (!strcmp(ct->name, cpu_fan_names[i])) { in pm112_new_control()
576 if (!strcmp(ct->name, "backside-fan")) { in pm112_new_control()
579 } else if (!strcmp(ct->name, "slots-fan")) { in pm112_new_control()
582 } else if (!strcmp(ct->name, "drive-bay-fan")) { in pm112_new_control()
594 max_exhaust = cpu_fans[0]->ops->get_max(cpu_fans[0]); in pm112_new_control()
598 ct->ops->get_max(ct) * 100 / max_exhaust; in pm112_new_control()
607 if (!strncmp(sr->name, "cpu-temp-", 9)) { in pm112_new_sensor()
608 i = sr->name[9] - '0'; in pm112_new_sensor()
609 if (sr->name[10] == 0 && i < NR_CORES && in pm112_new_sensor()
613 } else if (!strncmp(sr->name, "cpu-power-", 10)) { in pm112_new_sensor()
614 i = sr->name[10] - '0'; in pm112_new_sensor()
615 if (sr->name[11] == 0 && i < NR_CORES && in pm112_new_sensor()
618 } else if (!strcmp(sr->name, "hd-temp")) { in pm112_new_sensor()
621 } else if (!strcmp(sr->name, "slots-power")) { in pm112_new_sensor()
624 } 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()