All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Hardware Monitoring <linux-hwmon@vger.kernel.org>
Cc: Jean Delvare <jdelvare@suse.com>, Guenter Roeck <linux@roeck-us.net>
Subject: [PATCH 5/7] hwmon: (it87) Fix pwm4 detection for IT8620 and IT8628
Date: Thu,  9 Feb 2017 07:06:13 -0800	[thread overview]
Message-ID: <1486652775-3926-5-git-send-email-linux@roeck-us.net> (raw)
In-Reply-To: <1486652775-3926-1-git-send-email-linux@roeck-us.net>

pwm4 is enabled if bit 2 of GPIO control register 4 is disabled,
not when it is enabled. Since the check is for the skip condition,
it is reversed. This applies to both IT8620 and IT8628.

Fixes: 36c4d98a7883d ("hwmon: (it87) Add support for all pwm channels ...")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 drivers/hwmon/it87.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c
index 85918d8a747a..4f3fabcd470d 100644
--- a/drivers/hwmon/it87.c
+++ b/drivers/hwmon/it87.c
@@ -2614,7 +2614,7 @@ static int __init it87_find(int sioaddr, unsigned short *address,
 
 		/* Check for pwm4 */
 		reg = superio_inb(sioaddr, IT87_SIO_GPIO4_REG);
-		if (!(reg & BIT(2)))
+		if (reg & BIT(2))
 			sio_data->skip_pwm |= BIT(3);
 
 		/* Check for pwm2, fan2 */
-- 
2.7.4


  parent reply	other threads:[~2017-02-09 19:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-09 15:06 [PATCH 1/7] hwmon: (it87) Add feature flag indicating that VIN3 is connected to 5V Guenter Roeck
2017-02-09 15:06 ` [PATCH 2/7] hwmon: (it87) Add support for IT8622E Guenter Roeck
2017-02-09 15:06 ` [PATCH 3/7] hwmon: (it87) Improve IT8622 support Guenter Roeck
2017-02-09 15:06 ` [PATCH 4/7] hwmon: (it87) Ensure that pwm control cache is current before updating values Guenter Roeck
2017-02-09 15:06 ` Guenter Roeck [this message]
2017-02-09 15:06 ` [PATCH 6/7] hwmon: (it87) Do not overwrite bit 2..6 of pwm control registers Guenter Roeck
2017-02-09 15:06 ` [PATCH 7/7] hwmon: (it87) Add support for IT8792E Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1486652775-3926-5-git-send-email-linux@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.