Lines Matching refs:rpm
79 int rpm;
107 static int fcu_fan_set_rpm(struct fcu_fan *fan, int rpm);
111 int *rpm);
268 fcu_fan_set_rpm(struct fcu_fan *fan, int rpm)
277 rpm = max(fan->fan.min_rpm, rpm);
278 rpm = min(fan->fan.max_rpm, rpm);
282 fan->setpoint = rpm;
288 buf[0] = rpm >> (8 - fcu_rpm_shift);
289 buf[1] = rpm << fcu_rpm_shift;
304 int rpm;
343 /* It seems that we can read the fans rpm. */
347 rpm = (buff[0] << (8 - fcu_rpm_shift)) | buff[1] >> fcu_rpm_shift;
349 return (rpm);
385 fcu_fan_get_pwm(device_t dev, struct fcu_fan *fan, int *pwm, int *rpm)
433 /* Now read the rpm. */
438 *rpm = (buf[0] << (8 - fcu_rpm_shift)) | buf[1] >> fcu_rpm_shift;
481 if (strcmp(type + len, "fan-rpm") == 0)
531 int rpm = 0, pwm = 0, error = 0;
537 rpm = fcu_fan_get_rpm(fan);
538 if (rpm < 0)
540 error = sysctl_handle_int(oidp, &rpm, 0, req);
542 error = fcu_fan_get_pwm(fcu, fan, &pwm, &rpm);
551 error = sysctl_handle_int(oidp, &rpm, 0, req);
567 return (fcu_fan_set_rpm(fan, rpm));
633 "rpm", CTLTYPE_INT | CTLFLAG_RW, dev, i,
638 &sc->sc_fans[i].rpm);
659 "rpm", CTLTYPE_INT | CTLFLAG_RD, dev,
674 sc->sc_fans[i].rpm );