Skip to content

Commit 170a4b2

Browse files
osogroeck
authored andcommitted
hwmon: (max6639) fix inverted polarity
According to MAX6639 documentation: D1: PWM Output Polarity. PWM output is low at 100% duty cycle when this bit is set to zero. PWM output is high at 100% duty cycle when this bit is set to 1. Up to commit 0f33272 ("hwmon: (max6639) : Update hwmon init using info structure"), the polarity was set to high (0x2) when no platform data was set. After the patch, the polarity register wasn't set anymore if no platform data was specified. Nowadays, since commit 7506ebc ("hwmon: (max6639) : Configure based on DT property"), it is always set to low which doesn't match with the comment above and change the behavior compared to versions prior 0f33272. Fixes: 0f33272 ("hwmon: (max6639) : Update hwmon init using info structure") Signed-off-by: Olivier Sobrie <olivier@sobrie.be> Link: https://lore.kernel.org/r/20260304212039.570274-1-olivier@sobrie.be Signed-off-by: Guenter Roeck <linux@roeck-us.net>
1 parent e176ad7 commit 170a4b2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/hwmon/max6639.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ static int max6639_init_client(struct i2c_client *client,
607607
return err;
608608

609609
/* Fans PWM polarity high by default */
610-
err = regmap_write(data->regmap, MAX6639_REG_FAN_CONFIG2a(i), 0x00);
610+
err = regmap_write(data->regmap, MAX6639_REG_FAN_CONFIG2a(i), 0x02);
611611
if (err)
612612
return err;
613613

0 commit comments

Comments
 (0)