[PATCH AUTOSEL 6.19-6.1] hwmon: (f71882fg) Add F81968 support

Sasha Levin
2026-02-14T01:05:40Z

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