public inbox for linux-hwmon@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: patches@lists.linux.dev, stable@vger.kernel.org
Cc: "Ji-Ze Hong (Peter Hong)" <peter_hong@fintek.com.tw>,
	Guenter Roeck <linux@roeck-us.net>,
	Sasha Levin <sashal@kernel.org>,
	linux-hwmon@vger.kernel.org
Subject: [PATCH AUTOSEL 6.19-6.1] hwmon: (f71882fg) Add F81968 support
Date: Fri, 13 Feb 2026 19:59:18 -0500	[thread overview]
Message-ID: <20260214010245.3671907-78-sashal@kernel.org> (raw)
In-Reply-To: <20260214010245.3671907-1-sashal@kernel.org>

From: "Ji-Ze Hong (Peter Hong)" <peter_hong@fintek.com.tw>

[ Upstream commit e4a3d6f79c9933fece64368168c46d6cf5fc2e52 ]

Add hardware monitoring support for the Fintek F81968 Super I/O chip.
It is fully compatible with F81866.

Several products share compatibility with the F81866. To better distinguish
between them, ensure that the Product ID is displayed when the device is
probed.

Signed-off-by: Ji-Ze Hong (Peter Hong) <peter_hong@fintek.com.tw>
Link: https://lore.kernel.org/r/20251223051040.10227-1-peter_hong@fintek.com.tw
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---

LLM Generated explanations, may be completely bogus:

## Analysis

### Commit Message Analysis

The commit adds hardware monitoring support for a new Fintek F81968
Super I/O chip to the existing f71882fg hwmon driver. The commit message
explicitly states "It is fully compatible with F81866." Additionally, it
enhances the probe log message to include the Product ID (devid) for
better distinguishing between compatible products.

### Code Change Analysis

The changes are minimal and straightforward:

1. **New chip ID definition** (1 line): `#define SIO_F81968_ID 0x1806` -
   adds the device ID constant.

2. **New case in switch statement** (1 line): `case SIO_F81968_ID:` is
   added as a fall-through alongside the existing `SIO_F81866_ID` and
   `SIO_F81966_ID` cases, all mapping to `sio_data->type = f81866a`.
   This follows the exact same pattern as the existing F81966 which was
   also added as F81866-compatible.

3. **Enhanced log message** (2 lines changed): The `pr_info` message now
   includes `devid: %04x` to display the product ID during probe. This
   is a minor informational enhancement.

### Classification

This falls squarely into the **"New Device IDs"** exception category for
stable backporting:
- It adds a new chip ID to an **existing, mature driver** (f71882fg)
- The new chip (F81968) is declared **fully compatible** with F81866,
  which is already supported
- The pattern is identical to how F81966 was added (also as
  F81866-compatible)
- No new code paths, no new functionality beyond recognizing the ID

### Scope and Risk Assessment

- **Lines changed**: ~5 lines (1 define, 1 case label, 2-line log
  message change)
- **Files touched**: 1 (drivers/hwmon/f71882fg.c)
- **Risk**: Extremely low. The new ID simply falls through to an
  existing, well-tested code path (f81866a). The only other change is
  adding `devid` to a log message, which is trivially safe.
- **Regression potential**: Near zero. Existing hardware is completely
  unaffected.

### User Impact

Without this patch, users with F81968-based hardware get no hwmon
support (the driver prints "Unsupported Fintek device: 1806" and returns
-ENODEV). With this patch, their hardware monitoring works using the
proven F81866 code path. This is a real-world hardware enablement fix.

### Stability Indicators

- The author is from Fintek (the chip manufacturer), who has direct
  knowledge of chip compatibility
- The maintainer (Guenter Roeck) accepted it, and he is well-known for
  the hwmon subsystem
- The pattern matches exactly how previous compatible chips (F81966)
  were added

### Dependencies

None. The patch is completely self-contained and applies to any kernel
version that has the f71882fg driver with F81866/F81966 support.

### Decision

This is a textbook device ID addition to an existing driver - one of the
explicitly listed exceptions for stable backporting. It's tiny, zero-
risk, enables real hardware, and follows an established pattern in the
driver.

**YES**

 drivers/hwmon/f71882fg.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/hwmon/f71882fg.c b/drivers/hwmon/f71882fg.c
index df83f9866fbcf..204059d2de6cd 100644
--- a/drivers/hwmon/f71882fg.c
+++ b/drivers/hwmon/f71882fg.c
@@ -51,6 +51,7 @@
 #define SIO_F81866_ID		0x1010	/* Chipset ID */
 #define SIO_F71858AD_ID		0x0903	/* Chipset ID */
 #define SIO_F81966_ID		0x1502	/* Chipset ID */
+#define SIO_F81968_ID		0x1806	/* Chipset ID */
 
 #define REGION_LENGTH		8
 #define ADDR_REG_OFFSET		5
@@ -2570,6 +2571,7 @@ static int __init f71882fg_find(int sioaddr, struct f71882fg_sio_data *sio_data)
 		break;
 	case SIO_F81866_ID:
 	case SIO_F81966_ID:
+	case SIO_F81968_ID:
 		sio_data->type = f81866a;
 		break;
 	default:
@@ -2599,9 +2601,9 @@ static int __init f71882fg_find(int sioaddr, struct f71882fg_sio_data *sio_data)
 	address &= ~(REGION_LENGTH - 1);	/* Ignore 3 LSB */
 
 	err = address;
-	pr_info("Found %s chip at %#x, revision %d\n",
+	pr_info("Found %s chip at %#x, revision %d, devid: %04x\n",
 		f71882fg_names[sio_data->type],	(unsigned int)address,
-		(int)superio_inb(sioaddr, SIO_REG_DEVREV));
+		(int)superio_inb(sioaddr, SIO_REG_DEVREV), devid);
 exit:
 	superio_exit(sioaddr);
 	return err;
-- 
2.51.0


  parent reply	other threads:[~2026-02-14  1:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260214010245.3671907-1-sashal@kernel.org>
2026-02-14  0:58 ` [PATCH AUTOSEL 6.19] hwmon: (asus-ec-sensors) add Pro WS TRX50-SAGE WIFI A Sasha Levin
2026-02-14  0:58 ` [PATCH AUTOSEL 6.19-6.18] hwmon: (nct6683) Add customer ID for ASRock Z590 Taichi Sasha Levin
2026-02-14  0:59 ` Sasha Levin [this message]
2026-02-14  0:59 ` [PATCH AUTOSEL 6.19-6.18] hwmon: (emc2305) Fix a resource leak in emc2305_of_parse_pwm_child Sasha Levin
2026-02-14  0:59 ` [PATCH AUTOSEL 6.19-6.6] hwmon: (nct6775) Add ASUS Pro WS WRX90E-SAGE SE Sasha Levin
2026-02-14  0:59 ` [PATCH AUTOSEL 6.19-6.18] hwmon: (nct7363) Fix a resource leak in nct7363_present_pwm_fanin Sasha Levin
2026-02-14  1:00 ` [PATCH AUTOSEL 6.19-6.12] hwmon: (dell-smm) Add support for Dell OptiPlex 7080 Sasha Levin

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=20260214010245.3671907-78-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=patches@lists.linux.dev \
    --cc=peter_hong@fintek.com.tw \
    --cc=stable@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox