Couple of regressions, couple of zero-day bugs, a minor enhancement.
Nothing really major. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAABAgAGBQJPNB31AAoJEMsfJm/On5mBnTEP/1datmTSGILTyOi0qYNStO7C TWvsXmQAZosM19tUABfTVrLxNULzs3pXqkKYOQ2rOXmBzr0rneMVi3H9oHx8jbKr qPTVJPJax5P+3Nzi7eAHddzovD5SFNJjpX6b0VL9PJXG8MEsZ+74T4XkHgBKyBCH c9qKQdH9pYJWi6FDyHqyP6NzyWiH95SC8YMLgRs5VFTL5OyJJ98+VcY2jLY8li2S dUcLw9ZzXJwZyB//lFr1CGQfPEppuvCw4Adg4ZcDyfxpVPkBKt/XiIpgp4+OYAlz 8gdjselCVOAXBR0YZHmylgBO7O0BX0s9/WWfqi2bOSzM5HBFrLaRYJ4R4LzCbyOM mtqLgThJCttLxwAPWUQrjVxXuybrXBexH4qHhJ/5lfI1q6xK8k48LcNIBu8Syvkx BRDKj2YSxj+eWqdcuwjIyn+MbWmD62voZidx98dIrvJOlhU1qb5IKRcb5cbojC8o jx6rKaEGxmCEuqj4BP0ga1YsT61o0bsNH6tfv92UVWOnVIk2BaxbixvE2sFiSdCa iuhND1CYUCAgZOqWftjErsod2y8FqlmkqPIjLtheyKTjKrnrPqiwvmMkTKY0Wvkb wStis0tIBVpF+mVtXOzsdn9cAn4LBN6HuwtdtpUn23WmtJK6yOxE3+lbqtU/uKkv K7gRQuKPq1J1bbqjk6a9 =TRiK -----END PGP SIGNATURE----- Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Couple of regressions, couple of zero-day bugs, a minor enhancement. Nothing really major. * tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (f75375s) Let f75375_update_device treat pwmX as a measured value hwmon: (f75375s) Fix bit shifting in f75375_write16 hwmon: (f75375s) Fix reading of wrong register when initializing the F75387 hwmon: (f75375s) Fix automatic pwm mode setting for F75373 & F75375 hwmon: (w83627ehf) Remove duplicate code
This commit is contained in:
commit
1282ab3f8f
|
@ -172,7 +172,7 @@ static inline void f75375_write8(struct i2c_client *client, u8 reg,
|
|||
static inline void f75375_write16(struct i2c_client *client, u8 reg,
|
||||
u16 value)
|
||||
{
|
||||
int err = i2c_smbus_write_byte_data(client, reg, (value << 8));
|
||||
int err = i2c_smbus_write_byte_data(client, reg, (value >> 8));
|
||||
if (err)
|
||||
return;
|
||||
i2c_smbus_write_byte_data(client, reg + 1, (value & 0xFF));
|
||||
|
@ -200,9 +200,6 @@ static struct f75375_data *f75375_update_device(struct device *dev)
|
|||
f75375_read16(client, F75375_REG_FAN_MIN(nr));
|
||||
data->fan_target[nr] =
|
||||
f75375_read16(client, F75375_REG_FAN_EXP(nr));
|
||||
data->pwm[nr] = f75375_read8(client,
|
||||
F75375_REG_FAN_PWM_DUTY(nr));
|
||||
|
||||
}
|
||||
for (nr = 0; nr < 4; nr++) {
|
||||
data->in_max[nr] =
|
||||
|
@ -218,6 +215,8 @@ static struct f75375_data *f75375_update_device(struct device *dev)
|
|||
if (time_after(jiffies, data->last_updated + 2 * HZ)
|
||||
|| !data->valid) {
|
||||
for (nr = 0; nr < 2; nr++) {
|
||||
data->pwm[nr] = f75375_read8(client,
|
||||
F75375_REG_FAN_PWM_DUTY(nr));
|
||||
/* assign MSB, therefore shift it by 8 bits */
|
||||
data->temp11[nr] =
|
||||
f75375_read8(client, F75375_REG_TEMP(nr)) << 8;
|
||||
|
@ -369,7 +368,7 @@ static int set_pwm_enable_direct(struct i2c_client *client, int nr, int val)
|
|||
fanmode |= (3 << FAN_CTRL_MODE(nr));
|
||||
break;
|
||||
case 2: /* AUTOMATIC*/
|
||||
fanmode |= (2 << FAN_CTRL_MODE(nr));
|
||||
fanmode |= (1 << FAN_CTRL_MODE(nr));
|
||||
break;
|
||||
case 3: /* fan speed */
|
||||
break;
|
||||
|
@ -723,7 +722,7 @@ static void f75375_init(struct i2c_client *client, struct f75375_data *data,
|
|||
if (data->kind == f75387) {
|
||||
bool manu, duty;
|
||||
|
||||
if (!(conf & (1 << F75387_FAN_CTRL_LINEAR(nr))))
|
||||
if (!(mode & (1 << F75387_FAN_CTRL_LINEAR(nr))))
|
||||
data->pwm_mode[nr] = 1;
|
||||
|
||||
manu = ((mode >> F75387_FAN_MANU_MODE(nr)) & 1);
|
||||
|
|
|
@ -2349,11 +2349,6 @@ static int __devinit w83627ehf_probe(struct platform_device *pdev)
|
|||
/* Read fan clock dividers immediately */
|
||||
w83627ehf_update_fan_div_common(dev, data);
|
||||
|
||||
/* Read pwm data to save original values */
|
||||
w83627ehf_update_pwm_common(dev, data);
|
||||
for (i = 0; i < data->pwm_num; i++)
|
||||
data->pwm_enable_orig[i] = data->pwm_enable[i];
|
||||
|
||||
/* Read pwm data to save original values */
|
||||
w83627ehf_update_pwm_common(dev, data);
|
||||
for (i = 0; i < data->pwm_num; i++)
|
||||
|
|
Loading…
Reference in New Issue