mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Louvel <paul.louvel@bootlin.com>
To: Guenter Roeck <linux@roeck-us.net>,
	Jonathan Corbet <corbet@lwn.net>,
	 Shuah Khan <skhan@linuxfoundation.org>,
	 Randy Dunlap <rdunlap@infradead.org>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	 linux-hwmon@vger.kernel.org, linux-doc@vger.kernel.org,
	 linux-kernel@vger.kernel.org,
	Paul Louvel <paul.louvel@bootlin.com>
Subject: [PATCH 3/3] hwmon: (nct6775) Add support for NCT6122D
Date: Wed, 09 Sep 2026 20:25:56 +0200	[thread overview]
Message-ID: <20260909-bootlin-hwmon-nct6126-v1-3-4e85615fef10@bootlin.com> (raw)
In-Reply-To: <20260909-bootlin-hwmon-nct6126-v1-0-4e85615fef10@bootlin.com>

The NCT6122D hardware monitor is the same as the NCT6126D, the only
difference if the number of UARTs: two instead of six.
Add it to the driver using the nct6126 chip kind to avoid code
duplication.

Assisted-by: opencode:z-ai/glm-5.3-flash
Signed-off-by: Paul Louvel <paul.louvel@bootlin.com>
---
 drivers/hwmon/nct6775-platform.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/hwmon/nct6775-platform.c b/drivers/hwmon/nct6775-platform.c
index a8ef58d3a883..d359c28f3e0f 100644
--- a/drivers/hwmon/nct6775-platform.c
+++ b/drivers/hwmon/nct6775-platform.c
@@ -25,7 +25,7 @@ enum sensor_access { access_direct, access_asuswmi };
 static const char * const nct6775_sio_names[] __initconst = {
 	[nct6106] = "NCT6106D",
 	[nct6116] = "NCT6116D",
-	[nct6126] = "NCT6126D",
+	[nct6126] = "NCT6122D/NCT6126D",
 	[nct6775] = "NCT6775F",
 	[nct6776] = "NCT6776D/F",
 	[nct6779] = "NCT6779D",
@@ -77,6 +77,7 @@ MODULE_PARM_DESC(fan_debounce, "Enable debouncing for fan RPM signal");
 
 #define SIO_NCT6106_ID		0xc450
 #define SIO_NCT6116_ID		0xd280
+#define SIO_NCT6122_ID		0xd2a0
 #define SIO_NCT6126_A_ID	0xd283
 #define SIO_NCT6126_B_ID	0xd284
 #define SIO_NCT6775_ID		0xb470
@@ -1035,6 +1036,9 @@ static int __init nct6775_find(int sioaddr, struct nct6775_sio_data *sio_data)
 		else
 			sio_data->kind = nct6116;
 		break;
+	case SIO_NCT6122_ID:
+		sio_data->kind = nct6126;
+		break;
 	case SIO_NCT6775_ID:
 		sio_data->kind = nct6775;
 		break;

-- 
2.55.0


  parent reply	other threads:[~2026-09-09 18:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260909-bootlin-hwmon-nct6126-v1-0-4e85615fef10@bootlin.com>
2026-09-09 18:25 ` [PATCH 1/3] Documentation: hwmon: (nct6775) Document NCT6116D/NCT6122D/NCT6126D support Paul Louvel
2026-09-09 20:26   ` Guenter Roeck
2026-09-09 18:25 ` [PATCH 2/3] hwmon: (nct6775) Add support for NCT6126D Paul Louvel
2026-09-09 20:28   ` Guenter Roeck
2026-09-10  7:00     ` Paul Louvel
2026-09-09 18:25 ` Paul Louvel [this message]
2026-09-11  1:02   ` [PATCH 3/3] hwmon: (nct6775) Add support for NCT6122D 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=20260909-bootlin-hwmon-nct6126-v1-3-4e85615fef10@bootlin.com \
    --to=paul.louvel@bootlin.com \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=rdunlap@infradead.org \
    --cc=skhan@linuxfoundation.org \
    --cc=thomas.petazzoni@bootlin.com \
    /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

all inboxes | Powered by JetHome®