]>
Commit | Line | Data |
---|---|---|
b74db2ac GKH |
1 | From d66777caa57ffade6061782f3a4d4056f0b0c1ac Mon Sep 17 00:00:00 2001 |
2 | From: Guenter Roeck <linux@roeck-us.net> | |
3 | Date: Wed, 8 Feb 2017 14:05:56 -0800 | |
4 | Subject: hwmon: (it87) Fix pwm4 detection for IT8620 and IT8628 | |
5 | ||
6 | From: Guenter Roeck <linux@roeck-us.net> | |
7 | ||
8 | commit d66777caa57ffade6061782f3a4d4056f0b0c1ac upstream. | |
9 | ||
10 | pwm4 is enabled if bit 2 of GPIO control register 4 is disabled, | |
11 | not when it is enabled. Since the check is for the skip condition, | |
12 | it is reversed. This applies to both IT8620 and IT8628. | |
13 | ||
14 | Fixes: 36c4d98a7883d ("hwmon: (it87) Add support for all pwm channels ...") | |
15 | Signed-off-by: Guenter Roeck <linux@roeck-us.net> | |
16 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
17 | ||
18 | --- | |
19 | drivers/hwmon/it87.c | 2 +- | |
20 | 1 file changed, 1 insertion(+), 1 deletion(-) | |
21 | ||
22 | --- a/drivers/hwmon/it87.c | |
23 | +++ b/drivers/hwmon/it87.c | |
24 | @@ -2600,7 +2600,7 @@ static int __init it87_find(int sioaddr, | |
25 | ||
26 | /* Check for pwm4 */ | |
27 | reg = superio_inb(sioaddr, IT87_SIO_GPIO4_REG); | |
28 | - if (!(reg & BIT(2))) | |
29 | + if (reg & BIT(2)) | |
30 | sio_data->skip_pwm |= BIT(3); | |
31 | ||
32 | /* Check for pwm2, fan2 */ |