Linux Hardware Monitor development
 help / color / mirror / Atom feed
* [RFC PATCH] hwmon: (nct6775) Ignore 0xffff TSI temperature readings
@ 2026-08-24 18:44 蔡 紱彝
  2026-08-24 18:57 ` sashiko-bot
  2026-08-28 15:50 ` Guenter Roeck
  0 siblings, 2 replies; 3+ messages in thread
From: 蔡 紱彝 @ 2026-08-24 18:44 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Zev Weiss, linux-hwmon@vger.kernel.org,
	linux-kernel@vger.kernel.org

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-08-28 15:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-24 18:44 [RFC PATCH] hwmon: (nct6775) Ignore 0xffff TSI temperature readings 蔡 紱彝
2026-08-24 18:57 ` sashiko-bot
2026-08-28 15:50 ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox