Commit 50e58c89 authored by Vojtech Pavlik's avatar Vojtech Pavlik

Merge suse.cz:/data/bk/linus into suse.cz:/data/bk/input

parents 85103e8d 30e74fea
VERSION = 2 VERSION = 2
PATCHLEVEL = 6 PATCHLEVEL = 6
SUBLEVEL = 8 SUBLEVEL = 8
EXTRAVERSION =-rc2 EXTRAVERSION =-rc3
NAME=Zonked Quokka NAME=Zonked Quokka
# *DOCUMENTATION* # *DOCUMENTATION*
......
...@@ -317,6 +317,20 @@ static int fan_write_reg(int reg, const unsigned char *ptr, int nb) ...@@ -317,6 +317,20 @@ static int fan_write_reg(int reg, const unsigned char *ptr, int nb)
return nw; 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) static int set_rpm_fan(int fan, int rpm)
{ {
unsigned char buf[2]; unsigned char buf[2];
...@@ -1011,6 +1025,12 @@ static int main_control_loop(void *x) ...@@ -1011,6 +1025,12 @@ static int main_control_loop(void *x)
down(&driver_lock); 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 the PCI fan once for now */
set_pwm_fan(SLOTS_FAN_PWM_ID, SLOTS_FAN_DEFAULT_PWM); set_pwm_fan(SLOTS_FAN_PWM_ID, SLOTS_FAN_DEFAULT_PWM);
...@@ -1057,6 +1077,7 @@ static int main_control_loop(void *x) ...@@ -1057,6 +1077,7 @@ static int main_control_loop(void *x)
schedule_timeout(HZ - elapsed); schedule_timeout(HZ - elapsed);
} }
out:
DBG("main_control_loop ended\n"); DBG("main_control_loop ended\n");
ctrl_task = 0; ctrl_task = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment