Lines Matching +full:full +full:- +full:hd
1 // SPDX-License-Identifier: GPL-2.0-only
11 * that none of the code has been re-used, it's a complete re-implementation
165 tmax = ((s32)fvt->maxtemp) << 16; in wf_smu_create_cpu_fans()
174 wf_smu_cpu_fans->ticks = 1; in wf_smu_create_cpu_fans()
178 pid_param.history_len = piddata->history_len; in wf_smu_create_cpu_fans()
181 "CPU control loop (%d)\n", piddata->history_len); in wf_smu_create_cpu_fans()
184 pid_param.gd = piddata->gd; in wf_smu_create_cpu_fans()
185 pid_param.gp = piddata->gp; in wf_smu_create_cpu_fans()
186 pid_param.gr = piddata->gr / pid_param.history_len; in wf_smu_create_cpu_fans()
188 tdelta = ((s32)piddata->target_temp_delta) << 16; in wf_smu_create_cpu_fans()
189 maxpow = ((s32)piddata->max_power) << 16; in wf_smu_create_cpu_fans()
190 powadj = ((s32)piddata->power_adj) << 16; in wf_smu_create_cpu_fans()
193 pid_param.ttarget = tmax - tdelta; in wf_smu_create_cpu_fans()
194 pid_param.pmaxadj = maxpow - powadj; in wf_smu_create_cpu_fans()
199 wf_cpu_pid_init(&wf_smu_cpu_fans->pid, &pid_param); in wf_smu_create_cpu_fans()
223 if (--st->ticks != 0) { in wf_smu_cpu_fans_tick()
228 st->ticks = WF_SMU_CPU_FANS_INTERVAL; in wf_smu_cpu_fans_tick()
253 if (temp > st->pid.param.tmax) in wf_smu_cpu_fans_tick()
256 new_setpoint = wf_cpu_pid_run(&st->pid, power, temp); in wf_smu_cpu_fans_tick()
260 if (st->cpu_setpoint == new_setpoint) in wf_smu_cpu_fans_tick()
262 st->cpu_setpoint = new_setpoint; in wf_smu_cpu_fans_tick()
265 rc = wf_control_set(fan_cpu_main, st->cpu_setpoint); in wf_smu_cpu_fans_tick()
273 rc = wf_control_set(fan_cpu_second, st->cpu_setpoint); in wf_smu_cpu_fans_tick()
281 rc = wf_control_set(fan_cpu_third, st->cpu_setpoint); in wf_smu_cpu_fans_tick()
309 wf_smu_drive_fans->ticks = 1; in wf_smu_create_drive_fans()
312 param.additive = (fan_hd->type == WF_CONTROL_RPM_FAN); in wf_smu_create_drive_fans()
315 wf_pid_init(&wf_smu_drive_fans->pid, ¶m); in wf_smu_create_drive_fans()
332 if (--st->ticks != 0) { in wf_smu_drive_fans_tick()
337 st->ticks = st->pid.param.interval; in wf_smu_drive_fans_tick()
341 printk(KERN_WARNING "windfarm: HD temp sensor error %d\n", in wf_smu_drive_fans_tick()
347 DBG("wf_smu: Drive Fans tick ! HD temp: %d.%03d\n", in wf_smu_drive_fans_tick()
350 if (temp > (st->pid.param.itarget + 0x50000)) in wf_smu_drive_fans_tick()
353 new_setpoint = wf_pid_run(&st->pid, temp); in wf_smu_drive_fans_tick()
357 if (st->setpoint == new_setpoint) in wf_smu_drive_fans_tick()
359 st->setpoint = new_setpoint; in wf_smu_drive_fans_tick()
362 rc = wf_control_set(fan_hd, st->setpoint); in wf_smu_drive_fans_tick()
364 printk(KERN_WARNING "windfarm: HD fan error %d\n", in wf_smu_drive_fans_tick()
390 wf_smu_slots_fans->ticks = 1; in wf_smu_create_slots_fans()
393 param.additive = (fan_slots->type == WF_CONTROL_RPM_FAN); in wf_smu_create_slots_fans()
396 wf_pid_init(&wf_smu_slots_fans->pid, ¶m); in wf_smu_create_slots_fans()
413 if (--st->ticks != 0) { in wf_smu_slots_fans_tick()
418 st->ticks = st->pid.param.interval; in wf_smu_slots_fans_tick()
432 if (power > (st->pid.param.itarget + 0x50000)) in wf_smu_slots_fans_tick()
436 new_setpoint = wf_pid_run(&st->pid, power); in wf_smu_slots_fans_tick()
440 if (st->setpoint == new_setpoint) in wf_smu_slots_fans_tick()
442 st->setpoint = new_setpoint; in wf_smu_slots_fans_tick()
445 rc = wf_control_set(fan_slots, st->setpoint); in wf_smu_slots_fans_tick()
474 if (wf_smu_skipping && --wf_smu_skipping) in wf_smu_tick()
489 * fans to full speed. in wf_smu_tick()
542 if (fan_cpu_main == NULL && !strcmp(ct->name, "cpu-rear-fan-0")) { in wf_smu_new_control()
547 if (fan_cpu_second == NULL && !strcmp(ct->name, "cpu-rear-fan-1")) { in wf_smu_new_control()
552 if (fan_cpu_third == NULL && !strcmp(ct->name, "cpu-front-fan-0")) { in wf_smu_new_control()
557 if (cpufreq_clamp == NULL && !strcmp(ct->name, "cpufreq-clamp")) { in wf_smu_new_control()
562 if (fan_hd == NULL && !strcmp(ct->name, "drive-bay-fan")) { in wf_smu_new_control()
567 if (fan_slots == NULL && !strcmp(ct->name, "slots-fan")) { in wf_smu_new_control()
582 if (sensor_cpu_power == NULL && !strcmp(sr->name, "cpu-power")) { in wf_smu_new_sensor()
587 if (sensor_cpu_temp == NULL && !strcmp(sr->name, "cpu-temp")) { in wf_smu_new_sensor()
592 if (sensor_hd_temp == NULL && !strcmp(sr->name, "hd-temp")) { in wf_smu_new_sensor()
597 if (sensor_slots_power == NULL && !strcmp(sr->name, "slots-power")) { in wf_smu_new_sensor()
614 ((struct wf_control *)data)->name); in wf_smu_notify()
620 ((struct wf_sensor *)data)->name); in wf_smu_notify()
708 int rc = -ENODEV; in wf_smu_init()