Commit a1c1baf0 authored by Nikolaus Schulz's avatar Nikolaus Schulz Committed by Guenter Roeck

hwmon: (f75375s) Let f75375_update_device treat pwmX as a measured value

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: default avatarNikolaus Schulz <mail@microschulz.de>
Signed-off-by: default avatarGuenter Roeck <guenter.roeck@ericsson.com>
parent eb2f255b
...@@ -200,9 +200,6 @@ static struct f75375_data *f75375_update_device(struct device *dev) ...@@ -200,9 +200,6 @@ static struct f75375_data *f75375_update_device(struct device *dev)
f75375_read16(client, F75375_REG_FAN_MIN(nr)); f75375_read16(client, F75375_REG_FAN_MIN(nr));
data->fan_target[nr] = data->fan_target[nr] =
f75375_read16(client, F75375_REG_FAN_EXP(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++) { for (nr = 0; nr < 4; nr++) {
data->in_max[nr] = data->in_max[nr] =
...@@ -218,6 +215,8 @@ static struct f75375_data *f75375_update_device(struct device *dev) ...@@ -218,6 +215,8 @@ static struct f75375_data *f75375_update_device(struct device *dev)
if (time_after(jiffies, data->last_updated + 2 * HZ) if (time_after(jiffies, data->last_updated + 2 * HZ)
|| !data->valid) { || !data->valid) {
for (nr = 0; nr < 2; nr++) { 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 */ /* assign MSB, therefore shift it by 8 bits */
data->temp11[nr] = data->temp11[nr] =
f75375_read8(client, F75375_REG_TEMP(nr)) << 8; f75375_read8(client, F75375_REG_TEMP(nr)) << 8;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment