From: Sergio Melas <sergiomelas@gmail.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] hwmon: (yogafan) Support more than two fans and add 3rd fan for Legion Pro 7 16AFR10H
Date: Fri, 27 Nov 2026 06:28:40 +0100 [thread overview]
Message-ID: <20261127052841.492895-2-sergiomelas@gmail.com> (raw)
In-Reply-To: <20261127052841.492895-1-sergiomelas@gmail.com>
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@gmail.com>
---
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
next prev parent reply other threads:[~2026-11-27 5:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 5:28 [PATCH 0/2] hwmon: (yogafan) Support >2 fans and add additional Lenovo laptops Sergio Melas
2026-11-27 5:28 ` Sergio Melas [this message]
2026-11-27 5:28 ` [PATCH 2/2] hwmon: (yogafan) Add support for " Sergio Melas
2026-11-27 5:31 ` [PATCH 0/2] hwmon: (yogafan) Support >2 fans and add " sashiko-bot
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=20261127052841.492895-2-sergiomelas@gmail.com \
--to=sergiomelas@gmail.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
/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