Commit dd7406dd authored by Alex Hemme's avatar Alex Hemme Committed by Guenter Roeck

hwmon: (max31790) Set correct PWM value

Traced fans not spinning to incorrect PWM value being written.
The passed in value was written instead of the calulated value.

Fixes: 54187ff9 ("hwmon: (max31790) Convert to use new hwmon registration API")
Signed-off-by: default avatarAlex Hemme <ahemme@cisco.com>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 97da3854
...@@ -311,7 +311,7 @@ static int max31790_write_pwm(struct device *dev, u32 attr, int channel, ...@@ -311,7 +311,7 @@ static int max31790_write_pwm(struct device *dev, u32 attr, int channel,
data->pwm[channel] = val << 8; data->pwm[channel] = val << 8;
err = i2c_smbus_write_word_swapped(client, err = i2c_smbus_write_word_swapped(client,
MAX31790_REG_PWMOUT(channel), MAX31790_REG_PWMOUT(channel),
val); data->pwm[channel]);
break; break;
case hwmon_pwm_enable: case hwmon_pwm_enable:
fan_config = data->fan_config[channel]; fan_config = data->fan_config[channel];
......
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