]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
hwmon: (max6639) fix inverted polarity
authorOlivier Sobrie <olivier@sobrie.be>
Wed, 4 Mar 2026 21:20:39 +0000 (22:20 +0100)
committerGuenter Roeck <linux@roeck-us.net>
Wed, 4 Mar 2026 21:57:15 +0000 (13:57 -0800)
commit170a4b21f49b3dcff3115b4c90758f0a0d77375a
treef73638f3f14420ccd1d1ad652414c65211e53910
parente176ad7b57a1a15ece213251b7f3103bd929e26c
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 0f33272b60ed ("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 7506ebcd662b
("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 0f33272b60ed.

Fixes: 0f33272b60ed ("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>
drivers/hwmon/max6639.c