Skip to content

Commit 2101ccb

Browse files
Alex Hemmegregkh
authored andcommitted
hwmon: (max31790) Set correct PWM value
[ Upstream commit dd7406d ] Traced fans not spinning to incorrect PWM value being written. The passed in value was written instead of the calulated value. Fixes: 54187ff ("hwmon: (max31790) Convert to use new hwmon registration API") Signed-off-by: Alex Hemme <ahemme@cisco.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 4ee082a commit 2101ccb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/hwmon/max31790.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ static int max31790_write_pwm(struct device *dev, u32 attr, int channel,
311311
data->pwm[channel] = val << 8;
312312
err = i2c_smbus_write_word_swapped(client,
313313
MAX31790_REG_PWMOUT(channel),
314-
val);
314+
data->pwm[channel]);
315315
break;
316316
case hwmon_pwm_enable:
317317
fan_config = data->fan_config[channel];

0 commit comments

Comments
 (0)