All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anton Lundin <glance@ac2.se>
To: linux-hwmon@vger.kernel.org
Cc: Guenter Roeck <linux@roeck-us.net>,
	Zev Weiss <zev@bewilderbeest.net>, Anton Lundin <glance@ac2.se>
Subject: [PATCH v2 1/3] hwmon: (nct6775) Handle dual use registers
Date: Mon,  9 Nov 2026 09:25:09 +0100	[thread overview]
Message-ID: <20261109082511.851377-2-glance@ac2.se> (raw)
In-Reply-To: <20261109082511.851377-1-glance@ac2.se>

The REG_TARGET register has different meaning, depending on if pwm is in
thermal_cruise or speed_cruise.

This means we can't assume it's always word sized, so we need to handle
it differently depending on which mode we're in.

The code already does this, but the register was configured as word
sized for the speed_cruise mode, which would do the wrong thing in
thermal_cruise mode.

Signed-off-by: Anton Lundin <glance@ac2.se>
---
 drivers/hwmon/nct6775-core.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/hwmon/nct6775-core.c b/drivers/hwmon/nct6775-core.c
index 6e97e4f08b90..3515a962adac 100644
--- a/drivers/hwmon/nct6775-core.c
+++ b/drivers/hwmon/nct6775-core.c
@@ -1188,15 +1188,13 @@ bool nct6775_reg_is_word_sized(struct nct6775_data *data, u16 reg)
 	case nct6106:
 		return reg == 0x20 || reg == 0x22 || reg == 0x24 ||
 		  (reg >= 0x59 && reg < 0x69 && (reg & 1)) ||
-		  reg == 0xe0 || reg == 0xe2 || reg == 0xe4 ||
-		  reg == 0x111 || reg == 0x121 || reg == 0x131;
+		  reg == 0xe0 || reg == 0xe2 || reg == 0xe4;
 	case nct6116:
 	case nct6126:
 		return reg == 0x20 || reg == 0x22 || reg == 0x24 ||
 		  reg == 0x26 || reg == 0x28 || reg == 0x59 || reg == 0x5b ||
 		  reg == 0xe0 || reg == 0xe2 || reg == 0xe4 || reg == 0xe6 ||
-		  reg == 0xe8 || reg == 0x111 || reg == 0x121 || reg == 0x131 ||
-		  reg == 0x191 || reg == 0x1a1;
+		  reg == 0xe8;
 	case nct6775:
 		return (((reg & 0xff00) == 0x100 ||
 		    (reg & 0xff00) == 0x200) &&
-- 
2.47.3


  reply	other threads:[~2026-11-09  8:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-09  8:25 [PATCH v2 0/3] hwmon: (nct6775) Add support for NCT5525 Anton Lundin
2026-11-09  8:25 ` Anton Lundin [this message]
2026-11-09  8:37   ` [PATCH v2 1/3] hwmon: (nct6775) Handle dual use registers sashiko-bot
2026-11-09 15:58   ` Guenter Roeck
2026-11-09  8:25 ` [PATCH v2 2/3] hwmon: (nct6775) Avoid reading nonexistent PWM-mode registers Anton Lundin
2026-11-09  8:28   ` sashiko-bot
2026-11-09 16:00   ` Guenter Roeck
2026-11-09  8:25 ` [PATCH v2 3/3] hwmon: (nct6775) Add support for NCT5525 Anton Lundin
2026-11-09  8:35   ` sashiko-bot
2026-11-09 16:02   ` 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=20261109082511.851377-2-glance@ac2.se \
    --to=glance@ac2.se \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=zev@bewilderbeest.net \
    /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.