Lines Matching refs:fct
110 struct smu_fan_control *fct = to_smu_fan(ct);
112 kfree(fct);
117 struct smu_fan_control *fct = to_smu_fan(ct);
119 if (value < fct->min)
120 value = fct->min;
121 if (value > fct->max)
122 value = fct->max;
123 fct->value = value;
125 return smu_set_fan(fct->fan_type, fct->reg, value);
130 struct smu_fan_control *fct = to_smu_fan(ct);
131 *value = fct->value; /* todo: read from SMU */
137 struct smu_fan_control *fct = to_smu_fan(ct);
138 return fct->min;
143 struct smu_fan_control *fct = to_smu_fan(ct);
144 return fct->max;
159 struct smu_fan_control *fct;
164 fct = kmalloc(sizeof(struct smu_fan_control), GFP_KERNEL);
165 if (fct == NULL)
167 fct->ctrl.ops = &smu_fan_ops;
172 fct->fan_type = pwm_fan;
173 fct->ctrl.type = pwm_fan ? WF_CONTROL_PWM_FAN : WF_CONTROL_RPM_FAN;
184 fct->ctrl.name = NULL;
190 fct->ctrl.name = "cpu-rear-fan-0";
193 fct->ctrl.name = "cpu-rear-fan-1";
197 fct->ctrl.name = "cpu-front-fan-0";
200 fct->ctrl.name = "cpu-front-fan-1";
202 fct->ctrl.name = "cpu-pump-0";
204 fct->ctrl.name = "cpu-pump-1";
207 fct->ctrl.name = "slots-fan";
210 fct->ctrl.name = "drive-bay-fan";
212 fct->ctrl.name = "backside-fan";
216 fct->ctrl.name = "system-fan";
218 fct->ctrl.name = "cpu-fan";
220 fct->ctrl.name = "drive-bay-fan";
222 fct->ctrl.name = "hard-drive-fan";
224 fct->ctrl.name = "optical-drive-fan";
227 if (fct->ctrl.name == NULL)
234 fct->min = *v;
238 fct->max = *v;
244 fct->reg = *reg;
246 if (wf_register_control(&fct->ctrl))
249 return fct;
251 kfree(fct);
274 struct smu_fan_control *fct;
276 fct = smu_fan_create(fan, 0);
277 if (fct == NULL) {
282 list_add(&fct->link, &smu_fans);
293 struct smu_fan_control *fct;
295 fct = smu_fan_create(fan, 1);
296 if (fct == NULL) {
301 list_add(&fct->link, &smu_fans);
311 struct smu_fan_control *fct;
314 fct = list_entry(smu_fans.next, struct smu_fan_control, link);
315 list_del(&fct->link);
316 wf_unregister_control(&fct->ctrl);