[PATCH 1/2] hwmon: (yogafan) Support more than two fans and add 3rd fan for Legion Pro 7 16AFR10H
From: Sergio Melas
Date: Fri Nov 27 2026 - 00:28:53 EST
Expand struct yogafan_config.paths from 2 entries to MAX_FANS (8) so
laptops with more than two fans can be configured, matching struct
yoga_fan_data.
Update the Lenovo Legion Pro 7 16AFR10H (83RU) configuration to include
its third 8-bit tachometer field (\_SB.PCI0.LPC0.EC0.FASF, EC offset 0x04)
and update Documentation/hwmon/yogafan.rst accordingly.
Signed-off-by: Sergio Melas <sergiomelas@xxxxxxxxx>
---
Documentation/hwmon/yogafan.rst | 2 ++
drivers/hwmon/yogafan.c | 12 ++++++++++--
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/Documentation/hwmon/yogafan.rst b/Documentation/hwmon/yogafan.rst
index 239c7b576..c30cd9c81 100644
--- a/Documentation/hwmon/yogafan.rst
+++ b/Documentation/hwmon/yogafan.rst
@@ -107,6 +107,7 @@ immediately to ensure the user knows the fan has stopped.
83RU | Legion Pro 7 16 | 0x03/0x06 | \_SB.PCI0.LPC0.EC0.FANS/FA2S | 8-bit | 100
83KF | Yoga Pro 7 14IAH | 0x06 | \_SB.PC00.LPCB.EC0.FANS | 8-bit | 100
83BS | Yoga 7 16ARP8 | 0x03/0x06 | \_SB.PCI0.LPC0.EC0.FANS/FA2S | 8-bit | 100
+ 83RU | Legion Pro 7 16 | 0x04 | \_SB.PCI0.LPC0.EC0.FASF (Fan3) | 8-bit | 100
*Legacy* | Pre-2020 Models | 0x06 | \_SB.PCI0.LPC.EC.FAN0 | 8-bit | 100
-------------------------------------------------------------------------------------------------------
@@ -165,3 +166,4 @@ Contributors & DSDT Providers:
- **unlockxiaom** (Legion Pro 7 16AFR10H - 83RU, Yoga Pro 7 14IAH10 - 83KF, ThinkCentre M80q)
- **Phani Pavan K** (Yoga Pro 7 14IAH10 - 83KF)
- **Splarkszter** (Yoga 7 16ARP8 - 83BS)
+- **GabboRocchia** (Legion Pro 7 16AFR10H - 83RU 3rd fan)
diff --git a/drivers/hwmon/yogafan.c b/drivers/hwmon/yogafan.c
index 6d1284c09..172fdc198 100644
--- a/drivers/hwmon/yogafan.c
+++ b/drivers/hwmon/yogafan.c
@@ -41,7 +41,7 @@
struct yogafan_config {
int multiplier;
int fan_count;
- const char *paths[2];
+ const char *paths[MAX_FANS];
};
struct yoga_fan_data {
@@ -106,6 +106,14 @@ static const struct yogafan_config yoga_pro_83dn_cfg = {
"\\_SB.PC00.LPCB.EC0.FA2S" }
};
+static const struct yogafan_config legion_8bit_triple_cfg = {
+ .multiplier = 100,
+ .fan_count = 3,
+ .paths = { "\\_SB.PCI0.LPC0.EC0.FANS",
+ "\\_SB.PCI0.LPC0.EC0.FA2S",
+ "\\_SB.PCI0.LPC0.EC0.FASF" }
+};
+
static void apply_rllag_filter(struct yoga_fan_data *data, int idx, long raw_rpm)
{
ktime_t now = ktime_get_boottime();
@@ -259,7 +267,7 @@ static const struct dmi_system_id yogafan_quirks[] = {
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
DMI_MATCH(DMI_PRODUCT_FAMILY, "Legion Pro 7 16AFR10H"),
},
- .driver_data = (void *)&xiaoxin_8bit_dual_cfg,
+ .driver_data = (void *)&legion_8bit_triple_cfg,
},
{
.ident = "Lenovo Yoga Pro 7 14IAH10",
--
2.55.0