return nw;
}
+static int start_fcu(void)
+{
+ unsigned char buf = 0xff;
+ int rc;
+
+ rc = fan_write_reg(0xe, &buf, 1);
+ if (rc < 0)
+ return -EIO;
+ rc = fan_write_reg(0x2e, &buf, 1);
+ if (rc < 0)
+ return -EIO;
+ return 0;
+}
+
static int set_rpm_fan(int fan, int rpm)
{
unsigned char buf[2];
down(&driver_lock);
+ if (start_fcu() < 0) {
+ printk(KERN_ERR "kfand: failed to start FCU\n");
+ up(&driver_lock);
+ goto out;
+ }
+
/* Set the PCI fan once for now */
set_pwm_fan(SLOTS_FAN_PWM_ID, SLOTS_FAN_DEFAULT_PWM);
schedule_timeout(HZ - elapsed);
}
+ out:
DBG("main_control_loop ended\n");
ctrl_task = 0;