Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

hwmon: (nct6775) Fix fan6 detection for NCT6793D

Commit 2d99925a15b6 ("hwmon: (nct6775) Separate fan/pwm configuration
detection for NCT6793D") accidentally removed part of the code detecting
if fan6 is enabled or not. As result, fan6 is no longer detected on Asus
PRIME Z370-A. Restore the missing detection code.

Fixes: 2d99925a15b6 ("hwmon: (nct6775) Separate fan/pwm configuration detection for NCT6793D")
Reported-by: Chris Siebenmann <cks@cs.toronto.edu>
Cc: Chris Siebenmann <cks@cs.toronto.edu>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>

+2 -1
+2 -1
drivers/hwmon/nct6775.c
··· 3594 3594 fan5pin |= cr1b & BIT(5); 3595 3595 fan5pin |= creb & BIT(5); 3596 3596 3597 - fan6pin = creb & BIT(3); 3597 + fan6pin = !dsw_en && (cr2d & BIT(1)); 3598 + fan6pin |= creb & BIT(3); 3598 3599 3599 3600 pwm5pin |= cr2d & BIT(7); 3600 3601 pwm5pin |= (creb & BIT(4)) && !(cr2a & BIT(0));