]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.9.28/hwmon-it87-fix-pwm4-detection-for-it8620-and-it8628.patch
Remove duplicated commits
[thirdparty/kernel/stable-queue.git] / releases / 4.9.28 / hwmon-it87-fix-pwm4-detection-for-it8620-and-it8628.patch
CommitLineData
b74db2ac
GKH
1From d66777caa57ffade6061782f3a4d4056f0b0c1ac Mon Sep 17 00:00:00 2001
2From: Guenter Roeck <linux@roeck-us.net>
3Date: Wed, 8 Feb 2017 14:05:56 -0800
4Subject: hwmon: (it87) Fix pwm4 detection for IT8620 and IT8628
5
6From: Guenter Roeck <linux@roeck-us.net>
7
8commit d66777caa57ffade6061782f3a4d4056f0b0c1ac upstream.
9
10pwm4 is enabled if bit 2 of GPIO control register 4 is disabled,
11not when it is enabled. Since the check is for the skip condition,
12it is reversed. This applies to both IT8620 and IT8628.
13
14Fixes: 36c4d98a7883d ("hwmon: (it87) Add support for all pwm channels ...")
15Signed-off-by: Guenter Roeck <linux@roeck-us.net>
16Signed-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 */