]> www.infradead.org Git - users/jedix/linux-maple.git/commit
hwmon: (pwmfan) Do not force disable pwm controller
authorJohannes Kirchmair <johannes.kirchmair@skidata.com>
Tue, 27 Aug 2024 05:44:54 +0000 (07:44 +0200)
committerGuenter Roeck <linux@roeck-us.net>
Tue, 27 Aug 2024 15:12:23 +0000 (08:12 -0700)
commitebb75a3c5265ceeebd2b0708d013735e5eafbb69
tree58b4df358d086281390811c11dce6027de387835
parentac9cca7a6a17c6d8bd849be669005fac0420d4b5
hwmon: (pwmfan) Do not force disable pwm controller

The pwm1_enable attribute of the pwmfan driver influences the mode of
operation, especially in case of a requested pwm1 duty cycle of zero.
Especially setting pwm1_enable to two, should keep the pwm controller
enabled even if the duty cycle is set to zero [1].

This is not the case at the moment, as the pwm controller is disabled
always if pwm1 is set to zero.

This commit tries to fix this behavior.

[1] https://docs.kernel.org/hwmon/pwm-fan.html

Signed-off-by: Johannes Kirchmair <johannes.kirchmair@skidata.com>
Message-ID: <20240827054454.521494-1-mailinglist1@johanneskirchmair.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/pwm-fan.c