diff options
Diffstat (limited to 'drivers/macintosh')
-rw-r--r-- | drivers/macintosh/therm_adt746x.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/macintosh/therm_adt746x.c b/drivers/macintosh/therm_adt746x.c index 4a8bf467ff43..fde377c60cca 100644 --- a/drivers/macintosh/therm_adt746x.c +++ b/drivers/macintosh/therm_adt746x.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #define CONFIG_REG 0x40 | 37 | #define CONFIG_REG 0x40 |
38 | #define MANUAL_MASK 0xe0 | 38 | #define MANUAL_MASK 0xe0 |
39 | #define AUTO_MASK 0x20 | 39 | #define AUTO_MASK 0x20 |
40 | #define INVERT_MASK 0x10 | ||
40 | 41 | ||
41 | static u8 TEMP_REG[3] = {0x26, 0x25, 0x27}; /* local, sensor1, sensor2 */ | 42 | static u8 TEMP_REG[3] = {0x26, 0x25, 0x27}; /* local, sensor1, sensor2 */ |
42 | static u8 LIMIT_REG[3] = {0x6b, 0x6a, 0x6c}; /* local, sensor1, sensor2 */ | 43 | static u8 LIMIT_REG[3] = {0x6b, 0x6a, 0x6c}; /* local, sensor1, sensor2 */ |
@@ -226,7 +227,8 @@ static void write_fan_speed(struct thermostat *th, int speed, int fan) | |||
226 | 227 | ||
227 | if (speed >= 0) { | 228 | if (speed >= 0) { |
228 | manual = read_reg(th, MANUAL_MODE[fan]); | 229 | manual = read_reg(th, MANUAL_MODE[fan]); |
229 | write_reg(th, MANUAL_MODE[fan], manual|MANUAL_MASK); | 230 | write_reg(th, MANUAL_MODE[fan], |
231 | (manual|MANUAL_MASK) & (~INVERT_MASK)); | ||
230 | write_reg(th, FAN_SPD_SET[fan], speed); | 232 | write_reg(th, FAN_SPD_SET[fan], speed); |
231 | } else { | 233 | } else { |
232 | /* back to automatic */ | 234 | /* back to automatic */ |