mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-10-24 12:04:33 +00:00
bugfix: smart tach handling was not quite finished
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2659 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
85aa44e467
commit
e5ee8c4b03
1 file changed
+8
-2
+8
-2
@@ -1211,14 +1211,20 @@ void lm93_fan_smart_tach(struct i2c_client *client, int operation, int ctl_name,
|
||||
if (0 <= results[0] && results[0] <= 2) {
|
||||
|
||||
/* insert the new mapping and write it out */
|
||||
data->sf_tach_to_pwm = lm93_read_byte(client,
|
||||
LM93_REG_SF_TACH_TO_PWM);
|
||||
data->sf_tach_to_pwm &= ~0x3 << nr * 2;
|
||||
data->sf_tach_to_pwm |= results[0] << nr * 2;
|
||||
lm93_write_byte(client, LM93_REG_SF_TACH_TO_PWM,
|
||||
data->sf_tach_to_pwm);
|
||||
|
||||
/* insert the enable bit and write it out */
|
||||
data->sfc2 &= ~1 << nr;
|
||||
data->sfc2 |= 1 << nr;
|
||||
data->sfc2 = lm93_read_byte(client,
|
||||
LM93_REG_SFC2);
|
||||
if (results[0])
|
||||
data->sfc2 |= 1 << nr;
|
||||
else
|
||||
data->sfc2 &= ~1 << nr;
|
||||
lm93_write_byte(client, LM93_REG_SFC2,
|
||||
data->sfc2);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user