Skip to content

Commit

Permalink
hwmon: (f75375s) Let f75375_update_device treat pwmX as a measured value
Browse files Browse the repository at this point in the history
Treat pwmX as a measured value, not as a (mostly static) limit value, so
that it is updated more frequently from the device register.

Signed-off-by: Nikolaus Schulz <mail@microschulz.de>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
  • Loading branch information
Nikolaus Schulz authored and Guenter Roeck committed Feb 9, 2012
1 parent eb2f255 commit a1c1baf
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/hwmon/f75375s.c
Original file line number Diff line number Diff line change
Expand Up @@ -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] =
Expand All @@ -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;
Expand Down

0 comments on commit a1c1baf

Please sign in to comment.