Lines Matching refs:pwm
111 static int fcu_fan_set_pwm(struct fcu_fan *fan, int pwm);
112 static int fcu_fan_get_pwm(device_t dev, struct fcu_fan *fan, int *pwm,
355 fcu_fan_set_pwm(struct fcu_fan *fan, int pwm)
364 pwm = max(fan->fan.min_rpm, pwm);
365 pwm = min(fan->fan.max_rpm, pwm);
369 if (pwm > 100)
370 pwm = 100;
371 if (pwm < 30)
372 pwm = 30;
373 fan->setpoint = pwm;
379 buf[0] = (pwm * 2550) / 1000;
387 fcu_fan_get_pwm(device_t dev, struct fcu_fan *fan, int *pwm, int *rpm)
429 /* It seems that we can read the fans pwm. */
433 *pwm = (buf[0] * 1000) / 2550;
533 int rpm = 0, pwm = 0, error = 0;
544 error = fcu_fan_get_pwm(fcu, fan, &pwm, &rpm);
550 error = sysctl_handle_int(oidp, &pwm, 0, req);
571 return (fcu_fan_set_pwm(fan, pwm));
657 "pwm", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT,