Linux Hardware Monitor development
 help / color / mirror / Atom feed
From: "蔡 紱彝" <Spector.Tsai@outlook.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Zev Weiss <zev@bewilderbeest.net>,
	"linux-hwmon@vger.kernel.org" <linux-hwmon@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: [RFC PATCH] hwmon: (nct6775) Ignore 0xffff TSI temperature readings
Date: Mon, 24 Aug 2026 18:44:43 +0000	[thread overview]
Message-ID: <20260824184443.81887-1-Spector.Tsai@outlook.com> (raw)

On an NCT6793D, unused TSI temperature channels can return 0xffff.

The driver currently treats every non-zero TSI register value as an
active channel. This causes unused TSI channels to be exposed through
hwmon and results in bogus temperature readings of 3892313987
millidegrees Celsius.

Treat 0xffff as an inactive TSI channel.

With this change, the unused TSI channels are no longer exposed, while
TSI0 continues to report normally.

Tested on an ASRock A320M-HDV R4.0 with an NCT6793D.

Fixes: b68437ace4b8 ("hwmon: (nct6775) add support for TSI temperature registers")
Assisted-by: ChatGPT:GPT-5.6-Sol
Signed-off-by: Spector Tsai <Spector.Tsai@outlook.com>
---
 drivers/hwmon/nct6775-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hwmon/nct6775-core.c b/drivers/hwmon/nct6775-core.c
index 759ea3d1286e..34e6a01aa4e4 100644
--- a/drivers/hwmon/nct6775-core.c
+++ b/drivers/hwmon/nct6775-core.c
@@ -4339,7 +4339,7 @@ int nct6775_probe(struct device *dev, struct nct6775_data *data,
 		err = nct6775_read_value(data, data->REG_TSI_TEMP[i], &tmp);
 		if (err)
 			return err;
-		if (tmp)
+		if (tmp && tmp != 0xffff)
 			data->have_tsi_temp |= BIT(i);
 	}
 
-- 
2.43.0


             reply	other threads:[~2026-08-24 18:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-24 18:44 蔡 紱彝 [this message]
2026-08-24 18:57 ` [RFC PATCH] hwmon: (nct6775) Ignore 0xffff TSI temperature readings sashiko-bot
2026-08-28 15:50 ` 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=20260824184443.81887-1-Spector.Tsai@outlook.com \
    --to=spector.tsai@outlook.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox