hwmon: (it87) Do not overwrite bit 2..6 of pwm control registers
authorGuenter Roeck <linux@roeck-us.net>
Wed, 8 Feb 2017 22:07:42 +0000 (14:07 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 12 Mar 2017 05:41:42 +0000 (06:41 +0100)
commit4401e4779e2e6edea43f80ba1dc8e25e9bec7abd
treeb4773e0032be0a2087567896ffd39b197c51707f
parentacb06ff2d5d559c7a934fdb7f841cfc19eb4e4bd
hwmon: (it87) Do not overwrite bit 2..6 of pwm control registers

commit 4c7b8ca1ae5ed9e27014732c8a918ba11a86cf09 upstream.

In IT8620E, after setting pwm control to manual, it was observed that
pwm values for fan 4..6 have reversed results (writing 0 results in fans
running at full speed, writing 255 results in fans turned off).

With the new PWM control, pwm polarity for pwm control 4..6 is specified
in its pwm control registers. Those registers are overwritten when setting
the pwm mode or the temperature mapping. Do not touch bit 2..6 of pwm
control registers on register writes to fix the problem.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwmon/it87.c