w83792d: Fix PWM range. Backport from Linux 2.6, patch from Yuan Mu.

git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4040 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare committed 2006-06-05 08:06:27 +00:00
1 parent e6ba14f1bf
commit 3098b38071
2 files changed
+3 -2

No files matched your search

+1
View File
@@ -17,6 +17,7 @@ lm_sensors CHANGES file
Module i2c-piix4: Add ServerWorks HT-1000 support (2.6 backport)
Module i2c-viapro: Fix compilation with kernels < 2.4.21
Module w83781d: Use real-time alarm registers when possible (2.6 backport)
Module w83792d: Fix PWM range (2.6 backport)
Program decode-dimms.pl: Decode depending on the memory type
Decode the manufacturing date to an ISO8601 date
Add the memory size computation and provide brief
+2 -2
View File
@@ -1434,10 +1434,10 @@ static void w83792d_pwm(struct i2c_client *client, int operation, int ctl_name,
*nrels_mag = 0;
else if (operation == SENSORS_PROC_REAL_READ) {
w83792d_update_client(client);
results[0] = data->pwm[nr];
results[0] = data->pwm[nr] << 4;
*nrels_mag = 1;
} else if (operation == SENSORS_PROC_REAL_WRITE) {
data->pwm[nr] = SENSORS_LIMIT(results[0], 0, 15);
data->pwm[nr] = SENSORS_LIMIT(results[0], 0, 255) >> 4;
pwm_mask = w83792d_read_value(client,W83792D_REG_PWM[nr]) & 0xf0;
w83792d_write_value(client,W83792D_REG_PWM[nr],pwm_mask|data->pwm[nr]);
}