Lines Matching defs:fct

111 	struct smu_fan_control *fct = to_smu_fan(ct);
113 kfree(fct);
118 struct smu_fan_control *fct = to_smu_fan(ct);
120 if (value < fct->min)
121 value = fct->min;
122 if (value > fct->max)
123 value = fct->max;
124 fct->value = value;
126 return smu_set_fan(fct->fan_type, fct->reg, value);
131 struct smu_fan_control *fct = to_smu_fan(ct);
132 *value = fct->value; /* todo: read from SMU */
138 struct smu_fan_control *fct = to_smu_fan(ct);
139 return fct->min;
144 struct smu_fan_control *fct = to_smu_fan(ct);
145 return fct->max;
160 struct smu_fan_control *fct;
165 fct = kmalloc(sizeof(struct smu_fan_control), GFP_KERNEL);
166 if (fct == NULL)
168 fct->ctrl.ops = &smu_fan_ops;
173 fct->fan_type = pwm_fan;
174 fct->ctrl.type = pwm_fan ? WF_CONTROL_PWM_FAN : WF_CONTROL_RPM_FAN;
185 fct->ctrl.name = NULL;
191 fct->ctrl.name = "cpu-rear-fan-0";
194 fct->ctrl.name = "cpu-rear-fan-1";
198 fct->ctrl.name = "cpu-front-fan-0";
201 fct->ctrl.name = "cpu-front-fan-1";
203 fct->ctrl.name = "cpu-pump-0";
205 fct->ctrl.name = "cpu-pump-1";
208 fct->ctrl.name = "slots-fan";
211 fct->ctrl.name = "drive-bay-fan";
213 fct->ctrl.name = "backside-fan";
217 fct->ctrl.name = "system-fan";
219 fct->ctrl.name = "cpu-fan";
221 fct->ctrl.name = "drive-bay-fan";
223 fct->ctrl.name = "hard-drive-fan";
225 fct->ctrl.name = "optical-drive-fan";
228 if (fct->ctrl.name == NULL)
235 fct->min = *v;
239 fct->max = *v;
245 fct->reg = *reg;
247 if (wf_register_control(&fct->ctrl))
250 return fct;
252 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);
292 struct smu_fan_control *fct;
294 fct = smu_fan_create(fan, 1);
295 if (fct == NULL) {
300 list_add(&fct->link, &smu_fans);
310 struct smu_fan_control *fct;
313 fct = list_entry(smu_fans.next, struct smu_fan_control, link);
314 list_del(&fct->link);
315 wf_unregister_control(&fct->ctrl);