* [PATCH] hwmon: (yogafan) Add support for new Lenovo models
@ 2026-08-06 13:11 Sergio Melas
2026-08-06 13:24 ` sashiko-bot
2026-08-06 19:18 ` Guenter Roeck
0 siblings, 2 replies; 12+ messages in thread
From: Sergio Melas @ 2026-08-06 13:11 UTC (permalink / raw)
To: Guenter Roeck; +Cc: linux-hwmon, linux-kernel, Sergio Melas
Add DMI quirk entries and map correct ACPI paths and configurations for
additional Lenovo laptop models including the LOQ 15IAX9,
XiaoXin Pro 13ARE 2020, IdeaPad 3 15ALC6, Legion Pro 7 16AFR10H,
Yoga Pro 7 14IAH10, and Yoga 7 16ARP8.
Reorder the DMI quirk table to evaluate specific model matches before
generic family fallbacks, preventing DMI shadowing.
Signed-off-by: Sergio Melas <sergiomelas@gmail.com>
---
Documentation/hwmon/yogafan.rst | 27 ++++++++++++-
drivers/hwmon/yogafan.c | 69 +++++++++++++++++++++++++++++----
2 files changed, 87 insertions(+), 9 deletions(-)
diff --git a/Documentation/hwmon/yogafan.rst b/Documentation/hwmon/yogafan.rst
index 68761947a..6395c94f4 100644
--- a/Documentation/hwmon/yogafan.rst
+++ b/Documentation/hwmon/yogafan.rst
@@ -99,6 +99,11 @@ immediately to ensure the user knows the fan has stopped.
82XV / 83DV | LOQ 15/16 | 0xFE/0xFF | \_SB.PCI0.LPC0.EC0.FANS /FA2S | 16-bit | 1
83AK | ThinkBook G6 | 0x06 | \_SB.PCI0.LPC0.EC0.FAN0 | 8-bit | 100
81X1 | Flex 5 | 0x06 | \_SB.PCI0.LPC0.EC0.FAN0 | 8-bit | 100
+ 83KF | XiaoXinPro 13ARE | 0x06/0xFE | \_SB.PCI0.LPC0.EC0.FANS/FA2S | 8-bit | 100
+ 82KU | IdeaPad 3 15ALC6 | 0x06 | \_SB.PCI0.LPC0.EC0.FAN0 | 8-bit | 100
+ 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
*Legacy* | Pre-2020 Models | 0x06 | \_SB.PCI0.LPC.EC.FAN0 | 8-bit | 100
----------------------------------------------------------------------------------------------------
@@ -117,7 +122,6 @@ METHODOLOGY & IDENTIFICATION:
- 8-bit (Multiplier 100): Standard for Yoga/IdeaPad. Raw values (0-255).
- 16-bit (Multiplier 1): Standard for Legion/LOQ. Two registers (0xFE/0xFF).
-
References
----------
@@ -136,3 +140,24 @@ References
4. **Lenovo IdeaPad Laptop Driver:** Reference for DMI-based hardware
feature gating in Lenovo laptops.
https://github.com/torvalds/linux/blob/master/drivers/platform/x86/lenovo/ideapad-laptop.c
+
+5. **Lenovo Product Specifications Reference (PSREF):** Official hardware layout index
+ and spec sheets for active and withdrawn Lenovo laptop models.
+ https://psref.lenovo.com/l/withdrawn/
+
+6. **Yogafan Master Quirk Database:** Master spreadsheet mapping Lenovo Product
+ Specifications Reference (PSREF) to explicit EC offsets, register widths, paths, and multipliers.
+ https://github.com/sergiomelas/lenovo-linux-drivers/blob/main/Lenovo_Drivers/Prototype/PSREF/yogafan_v3_quirks_database.ods
+
+7. **Yogafan ACPI DSDT Repository:** Central repository containing user-contributed raw
+ and decompiled ACPI DSDT firmware dumps used for path verification and hardware expansions.
+ https://github.com/sergiomelas/lenovo-linux-drivers/tree/main/Lenovo_Drivers/Prototype/DSDT
+
+Contributors & DSDT Providers:
+------------------------------
+- **Sarbajit Sarkar** (Lenovo LOQ 15IAX9)
+- **HinataKato** (XiaoXin Pro 13ARE 2020 - 83KF)
+- **PenPenIsGod** (IdeaPad 3 15ALC6 - 82KU & Legion Pro 7 16AFR10H - 83RU)
+- **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)
diff --git a/drivers/hwmon/yogafan.c b/drivers/hwmon/yogafan.c
index 0a41b8672..48fa5148d 100644
--- a/drivers/hwmon/yogafan.c
+++ b/drivers/hwmon/yogafan.c
@@ -53,6 +53,7 @@ struct yoga_fan_data {
};
/* Specific configurations mapped via DMI */
+
static const struct yogafan_config yoga_8bit_fans_cfg = {
.multiplier = 100,
.fan_count = 1,
@@ -77,6 +78,18 @@ static const struct yogafan_config loq_15iax9_8bit_dual_cfg = {
.paths = { "\\_SB.PC00.LPCB.EC0.FA1S", "\\_SB.PC00.LPCB.EC0.FA2S" }
};
+static const struct yogafan_config xiaoxin_8bit_dual_cfg = {
+ .multiplier = 100,
+ .fan_count = 2,
+ .paths = { "\\_SB.PCI0.LPC0.EC0.FANS", "\\_SB.PCI0.LPC0.EC0.FA2S" }
+};
+
+static const struct yogafan_config yoga_pro_7_14iah10_cfg = {
+ .multiplier = 100,
+ .fan_count = 1,
+ .paths = { "\\_SB.PC00.LPCB.EC0.FANS", NULL }
+};
+
static void apply_rllag_filter(struct yoga_fan_data *data, int idx, long raw_rpm)
{
ktime_t now = ktime_get_boottime();
@@ -176,6 +189,54 @@ static const struct hwmon_chip_info yoga_fan_chip_info = {
};
static const struct dmi_system_id yogafan_quirks[] = {
+ {
+ .ident = "Lenovo LOQ 15IAX9",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_FAMILY, "LOQ 15IAX9"),
+ },
+ .driver_data = (void *)&loq_15iax9_8bit_dual_cfg,
+ },
+ {
+ .ident = "Lenovo XiaoXin Pro 13ARE 2020",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_FAMILY, "XiaoXinPro-13ARE 2020"),
+ },
+ .driver_data = (void *)&xiaoxin_8bit_dual_cfg,
+ },
+ {
+ .ident = "Lenovo IdeaPad 3 15ALC6",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_FAMILY, "IdeaPad 3 15ALC6"),
+ },
+ .driver_data = (void *)&ideapad_8bit_fan0_cfg,
+ },
+ {
+ .ident = "Lenovo Legion Pro 7 16AFR10H",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_FAMILY, "Legion Pro 7 16AFR10H"),
+ },
+ .driver_data = (void *)&xiaoxin_8bit_dual_cfg,
+ },
+ {
+ .ident = "Lenovo Yoga Pro 7 14IAH10",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_FAMILY, "Yoga Pro 7 14IAH10"),
+ },
+ .driver_data = (void *)&yoga_pro_7_14iah10_cfg,
+ },
+ {
+ .ident = "Lenovo Yoga 7 16ARP8",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_FAMILY, "Yoga 7 16ARP8"),
+ },
+ .driver_data = (void *)&xiaoxin_8bit_dual_cfg,
+ },
{
.ident = "Lenovo Yoga",
.matches = {
@@ -200,14 +261,6 @@ static const struct dmi_system_id yogafan_quirks[] = {
},
.driver_data = (void *)&ideapad_8bit_fan0_cfg,
},
- {
- .ident = "Lenovo LOQ 15IAX9",
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_FAMILY, "LOQ 15IAX9"),
- },
- .driver_data = (void *)&loq_15iax9_8bit_dual_cfg,
- },
{ }
};
MODULE_DEVICE_TABLE(dmi, yogafan_quirks);
--
2.55.0
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [PATCH] hwmon: (yogafan) Add support for new Lenovo models
2026-08-06 13:11 [PATCH] hwmon: (yogafan) Add support for new Lenovo models Sergio Melas
@ 2026-08-06 13:24 ` sashiko-bot
2026-08-06 15:44 ` Guenter Roeck
2026-08-06 19:18 ` Guenter Roeck
1 sibling, 1 reply; 12+ messages in thread
From: sashiko-bot @ 2026-08-06 13:24 UTC (permalink / raw)
To: Sergio Melas; +Cc: linux-hwmon
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Specific Lenovo model DMI quirks incorrectly use `DMI_PRODUCT_FAMILY` for exact model string matching, causing all specific quirks to fail and fall back to incorrect generic profiles.
--
--- Patch [1]: [PATCH] hwmon: (yogafan) Add support for new Lenovo models ---
commit ea309cfac96f236f87726dc09f574a3015681685
Author: Sergio Melas <sergiomelas@gmail.com>
hwmon: (yogafan) Add support for new Lenovo models
This patch adds DMI quirk entries mapping correct ACPI paths and
configurations for several additional Lenovo laptop models. It also reorders
the quirk table to evaluate specific model matches before generic family
fallbacks to prevent DMI shadowing.
> diff --git a/drivers/hwmon/yogafan.c b/drivers/hwmon/yogafan.c
> index 0a41b8672b56e..48fa5148d9e2c 100644
> --- a/drivers/hwmon/yogafan.c
> +++ b/drivers/hwmon/yogafan.c
[ ... ]
> @@ -176,6 +189,54 @@ static const struct hwmon_chip_info yoga_fan_chip_info = {
> };
>
> static const struct dmi_system_id yogafan_quirks[] = {
[ ... ]
> + {
> + .ident = "Lenovo IdeaPad 3 15ALC6",
> + .matches = {
> + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> + DMI_MATCH(DMI_PRODUCT_FAMILY, "IdeaPad 3 15ALC6"),
[Severity: High]
Does this correctly match the hardware?
Lenovo firmware typically populates DMI_PRODUCT_FAMILY with short generic
strings (e.g., "IdeaPad"). Since dmi_first_match() uses strstr() to find the
quirk string inside the hardware string, searching for a long specific string
like "IdeaPad 3 15ALC6" inside "IdeaPad" will always fail.
Should this match against DMI_PRODUCT_VERSION or DMI_PRODUCT_NAME instead?
> + },
> + .driver_data = (void *)&ideapad_8bit_fan0_cfg,
> + },
> + {
> + .ident = "Lenovo Legion Pro 7 16AFR10H",
> + .matches = {
> + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> + DMI_MATCH(DMI_PRODUCT_FAMILY, "Legion Pro 7 16AFR10H"),
[Severity: High]
If this match fails for the same reason, the hardware would fall back to the
generic "Legion" quirk at the bottom of the table.
Because the generic profile specifies a multiplier of 1 instead of 100, wouldn't
this result in wildly incorrect sensor readings for this hardware?
> + },
> + .driver_data = (void *)&xiaoxin_8bit_dual_cfg,
> + },
> + {
> + .ident = "Lenovo Yoga Pro 7 14IAH10",
> + .matches = {
> + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> + DMI_MATCH(DMI_PRODUCT_FAMILY, "Yoga Pro 7 14IAH10"),
[Severity: High]
Similarly, if this match fails and falls back to the generic "Yoga" quirk,
the driver would attempt to use the PCI0.LPC0 ACPI path instead of PC00.LPCB.
Could this cause the driver to fail to probe on this device?
> + },
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260806131103.19104-1-sergiomelas@gmail.com?part=1
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH] hwmon: (yogafan) Add support for new Lenovo models
2026-08-06 13:24 ` sashiko-bot
@ 2026-08-06 15:44 ` Guenter Roeck
2026-08-06 18:26 ` Sergio Melas
0 siblings, 1 reply; 12+ messages in thread
From: Guenter Roeck @ 2026-08-06 15:44 UTC (permalink / raw)
To: sashiko-reviews, Sergio Melas; +Cc: linux-hwmon
Sergio,
On 8/6/26 06:24, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [High] Specific Lenovo model DMI quirks incorrectly use `DMI_PRODUCT_FAMILY` for exact model string matching, causing all specific quirks to fail and fall back to incorrect generic profiles.
> --
Please confirm that this is a non-issue.
Thanks,
Guenter
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] hwmon: (yogafan) Add support for new Lenovo models
2026-08-06 15:44 ` Guenter Roeck
@ 2026-08-06 18:26 ` Sergio Melas
2026-08-06 19:17 ` Guenter Roeck
0 siblings, 1 reply; 12+ messages in thread
From: Sergio Melas @ 2026-08-06 18:26 UTC (permalink / raw)
To: Guenter Roeck; +Cc: sashiko-reviews, linux-hwmon
Hi Guenter,
Confirming that at my knowledge this is a non-issue.
However, using the 4-letter machine type code DMI_PRODUCT_NAME could
theoretically
offer even tighter precision, but up to now, the current matching
method has never failed in our
testing and field deployment users of my github:
https://github.com/sergiomelas/lenovo-linux-drivers/tree/main
Anyway, I am compiling a full database for complete data of Lenovo
machines from PSREF:
https://psref.lenovo.com/
For reference, the complete mapping matrix and DSDT traces can be
found in the Yogafan Master Quirk Database.
My database on based on this source and others is here:
https://github.com/sergiomelas/lenovo-linux-drivers/blob/main/Lenovo_Drivers/Prototype/PSREF/yogafan_v3_quirks_database.ods
and
https://github.com/sergiomelas/lenovo-linux-drivers/tree/main/Lenovo_Drivers/Prototype/DSDT
I propose to switch to this identification method when we have more
machine references.
What do yo think?
Thanks, Sergio
On Thu, Aug 6, 2026 at 5:44 PM Guenter Roeck <linux@roeck-us.net> wrote:
>
> Sergio,
>
> On 8/6/26 06:24, sashiko-bot@kernel.org wrote:
> > Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> > - [High] Specific Lenovo model DMI quirks incorrectly use `DMI_PRODUCT_FAMILY` for exact model string matching, causing all specific quirks to fail and fall back to incorrect generic profiles.
> > --
>
> Please confirm that this is a non-issue.
>
> Thanks,
> Guenter
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] hwmon: (yogafan) Add support for new Lenovo models
2026-08-06 18:26 ` Sergio Melas
@ 2026-08-06 19:17 ` Guenter Roeck
0 siblings, 0 replies; 12+ messages in thread
From: Guenter Roeck @ 2026-08-06 19:17 UTC (permalink / raw)
To: Sergio Melas; +Cc: sashiko-reviews, linux-hwmon
On 8/6/26 11:26, Sergio Melas wrote:
> Hi Guenter,
>
> Confirming that at my knowledge this is a non-issue.
> However, using the 4-letter machine type code DMI_PRODUCT_NAME could
> theoretically
> offer even tighter precision, but up to now, the current matching
> method has never failed in our
> testing and field deployment users of my github:
> https://github.com/sergiomelas/lenovo-linux-drivers/tree/main
>
> Anyway, I am compiling a full database for complete data of Lenovo
> machines from PSREF:
> https://psref.lenovo.com/
> For reference, the complete mapping matrix and DSDT traces can be
> found in the Yogafan Master Quirk Database.
> My database on based on this source and others is here:
> https://github.com/sergiomelas/lenovo-linux-drivers/blob/main/Lenovo_Drivers/Prototype/PSREF/yogafan_v3_quirks_database.ods
> and
> https://github.com/sergiomelas/lenovo-linux-drivers/tree/main/Lenovo_Drivers/Prototype/DSDT
>
> I propose to switch to this identification method when we have more
> machine references.
> What do yo think?
>
No need from my perspective, if the current code works.
I'll go ahead and apply your patch.
Thanks,
Guenter
> Thanks, Sergio
>
>
>
> On Thu, Aug 6, 2026 at 5:44 PM Guenter Roeck <linux@roeck-us.net> wrote:
>>
>> Sergio,
>>
>> On 8/6/26 06:24, sashiko-bot@kernel.org wrote:
>>> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
>>> - [High] Specific Lenovo model DMI quirks incorrectly use `DMI_PRODUCT_FAMILY` for exact model string matching, causing all specific quirks to fail and fall back to incorrect generic profiles.
>>> --
>>
>> Please confirm that this is a non-issue.
>>
>> Thanks,
>> Guenter
>>
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] hwmon: (yogafan) Add support for new Lenovo models
2026-08-06 13:11 [PATCH] hwmon: (yogafan) Add support for new Lenovo models Sergio Melas
2026-08-06 13:24 ` sashiko-bot
@ 2026-08-06 19:18 ` Guenter Roeck
1 sibling, 0 replies; 12+ messages in thread
From: Guenter Roeck @ 2026-08-06 19:18 UTC (permalink / raw)
To: Sergio Melas; +Cc: linux-hwmon, linux-kernel
On Thu, Aug 06, 2026 at 03:11:03PM +0200, Sergio Melas wrote:
> Add DMI quirk entries and map correct ACPI paths and configurations for
> additional Lenovo laptop models including the LOQ 15IAX9,
> XiaoXin Pro 13ARE 2020, IdeaPad 3 15ALC6, Legion Pro 7 16AFR10H,
> Yoga Pro 7 14IAH10, and Yoga 7 16ARP8.
>
> Reorder the DMI quirk table to evaluate specific model matches before
> generic family fallbacks, preventing DMI shadowing.
>
> Signed-off-by: Sergio Melas <sergiomelas@gmail.com>
Applied.
Thanks,
Guenter
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] hwmon: (yogafan) Add support for new Lenovo models
@ 2026-09-06 2:10 Sergio Melas
2026-09-06 2:17 ` sashiko-bot
2026-09-06 16:35 ` Guenter Roeck
0 siblings, 2 replies; 12+ messages in thread
From: Sergio Melas @ 2026-09-06 2:10 UTC (permalink / raw)
To: Guenter Roeck; +Cc: linux-hwmon, linux-kernel, Sergio Melas
Add DMI quirk entries and map correct ACPI paths and configurations for
additional Lenovo laptop models: Yoga 14cACN 2021, IdeaPad 3 15ALC6 Ub
and Yoga 740-15IML.
DMI product family matching is finally preferred over product name to
reliably distinguish identical model numbers with different internal
fan layouts:
MODEL (DMI PN) | FAMILY / SERIES | FULL ACPI OBJECT PATH
82KU | IdeaPad 3 15ALC6 | \_SB.PCI0.LPC0.EC0.FAN0
82KU | IdeaPad 3 15ALC6 ub| \_SB.PCI0.LPC0.EC0.FANS/FA2S
Signed-off-by: Sergio Melas <sergiomelas@gmail.com>
---
Documentation/hwmon/yogafan.rst | 40 +++++++++++------------
drivers/hwmon/yogafan.c | 58 +++++++++++++++++++++------------
2 files changed, 57 insertions(+), 41 deletions(-)
diff --git a/Documentation/hwmon/yogafan.rst b/Documentation/hwmon/yogafan.rst
index 9ff5db5dc..a7e628bc3 100644
--- a/Documentation/hwmon/yogafan.rst
+++ b/Documentation/hwmon/yogafan.rst
@@ -85,27 +85,26 @@ immediately to ensure the user knows the fan has stopped.
::
- MODEL (DMI PN) | FAMILY / SERIES | EC OFFSET | FULL ACPI OBJECT PATH | WIDTH | MULTiplier
+ MODEL (DMI PN) | FAMILY / SERIES | EC OFFSET | FULL ACPI OBJECT PATH | WIDTH | MULTiplier
----------------------------------------------------------------------------------------------------
- 82N7 | Yoga 14cACN | 0x06 | \_SB.PCI0.LPC0.EC0.FANS | 8-bit | 100
- 80V2 / 81C3 | Yoga 710/720 | 0x06 | \_SB.PCI0.LPC0.EC0.FAN0 | 8-bit | 100
- 83E2 | Yoga Pro 7 | 0xFE | \_SB.PCI0.LPC0.EC0.FANS | 8-bit | 100
- 83DN | Yoga Pro 9 16IMH9 | 0x06/0xFE | \_SB.PC00.LPCB.EC0.FANS/FA2S | 8-bit | 100
- 82A2 / 82A3 | Yoga Slim 7 | 0x06 | \_SB.PCI0.LPC0.EC0.FANS | 8-bit | 100
- 81YM / 82FG | IdeaPad 5 | 0x06 | \_SB.PCI0.LPC0.EC0.FAN0 | 8-bit | 100
- 82JW / 82JU | Legion 5 (AMD) | 0xFE/0xFF | \_SB.PCI0.LPC0.EC0.FANS (Fan1) | 16-bit | 1
- 82JW / 82JU | Legion 5 (AMD) | 0xFE/0xFF | \_SB.PCI0.LPC0.EC0.FA2S (Fan2) | 16-bit | 1
- 82WQ | Legion 7i (Int) | 0xFE/0xFF | \_SB.PCI0.LPC0.EC0.FANS (Fan1) | 16-bit | 1
- 82WQ | Legion 7i (Int) | 0xFE/0xFF | \_SB.PCI0.LPC0.EC0.FA2S (Fan2) | 16-bit | 1
- 82XV / 83DV | LOQ 15/16 | 0xFE/0xFF | \_SB.PCI0.LPC0.EC0.FANS /FA2S | 16-bit | 1
- 83AK | ThinkBook G6 | 0x06 | \_SB.PCI0.LPC0.EC0.FAN0 | 8-bit | 100
- 81X1 | Flex 5 | 0x06 | \_SB.PCI0.LPC0.EC0.FAN0 | 8-bit | 100
- 83KF | XiaoXinPro 13ARE | 0x06/0xFE | \_SB.PCI0.LPC0.EC0.FANS/FA2S | 8-bit | 100
- 82KU | IdeaPad 3 15ALC6 | 0x06 | \_SB.PCI0.LPC0.EC0.FAN0 | 8-bit | 100
- 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
- *Legacy* | Pre-2020 Models | 0x06 | \_SB.PCI0.LPC.EC.FAN0 | 8-bit | 100
+ 82N7 | Yoga 14cACN | 0x06 | \_SB.PCI0.LPC0.EC0.FANS | 8-bit | 100
+ 80V2 / 81C3 | Yoga 710/720 | 0x06 | \_SB.PCI0.LPC0.EC0.FAN0 | 8-bit | 100
+ 83E2 / 83DN | Yoga Pro 7/9 | 0xFE | \_SB.PCI0.LPC0.EC0.FANS | 8-bit | 100
+ 82A2 / 82A3 | Yoga Slim 7 | 0x06 | \_SB.PCI0.LPC0.EC0.FANS | 8-bit | 100
+ 81YM / 82FG | IdeaPad 5 | 0x06 | \_SB.PCI0.LPC0.EC0.FAN0 | 8-bit | 100
+ 82JW / 82JU | Legion 5 (AMD) | 0xFE/0xFF | \_SB.PCI0.LPC0.EC0.FANS/FA2S | 16-bit | 1
+ 82WQ | Legion 7i (Int) | 0xFE/0xFF | \_SB.PCI0.LPC0.EC0.FANS/FA2S | 16-bit | 1
+ 82XV / 83DV | LOQ 15/16 | 0xFE/0xFF | \_SB.PCI0.LPC0.EC0.FANS/FA2S | 16-bit | 1
+ 83AK | ThinkBook G6 | 0x06 | \_SB.PCI0.LPC0.EC0.FAN0 | 8-bit | 100
+ 81TD | Yoga 740-15IML | 0x06 | \_SB.PCI0.LPCB.EC0.FANS | 8-bit | 100
+ 81X1 | Flex 5 | 0x06 | \_SB.PCI0.LPC0.EC0.FAN0 | 8-bit | 100
+ 83KF | XiaoXinPro 13ARE | 0x06/0xFE | \_SB.PCI0.LPC0.EC0.FANS/FA2S | 8-bit | 100
+ 82KU | IdeaPad 3 15ALC6 | 0x06 | \_SB.PCI0.LPC0.EC0.FAN0 | 8-bit | 100
+ 82KU | IdeaPad 3 15ALC6 ub| 0x06 | \_SB.PCI0.LPC0.EC0.FANS/FA2S | 8-bit | 100
+ 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
+ *Legacy* | Pre-2020 Models | 0x06 | \_SB.PCI0.LPC.EC.FAN0 | 8-bit | 100
----------------------------------------------------------------------------------------------------
METHODOLOGY & IDENTIFICATION:
@@ -159,6 +158,7 @@ Contributors & DSDT Providers:
- **Sarbajit Sarkar** (Lenovo LOQ 15IAX9)
- **HinataKato** (XiaoXin Pro 13ARE 2020 - 83KF)
- **PenPenIsGod** (IdeaPad 3 15ALC6 - 82KU & Legion Pro 7 16AFR10H - 83RU)
+- **wizard-28** (IdeaPad 3 15ALC6 Ub - 82KU)
- **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)
diff --git a/drivers/hwmon/yogafan.c b/drivers/hwmon/yogafan.c
index 413ddc721..2ce358c74 100644
--- a/drivers/hwmon/yogafan.c
+++ b/drivers/hwmon/yogafan.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
-/*
- * yoga_fan.c - Lenovo Yoga/Legion Fan Hardware Monitoring Driver
+/**
+ * yogafan.c - Lenovo Yoga/Legion Fan Hardware Monitoring Driver
*
* Provides fan speed monitoring for Lenovo Yoga, Legion, and IdeaPad
* laptops by interfacing with the Embedded Controller (EC) via ACPI.
@@ -53,6 +53,17 @@ struct yoga_fan_data {
};
/* Specific configurations mapped via DMI */
+static const struct yogafan_config yoga_740_15iml_cfg = {
+ .multiplier = 100,
+ .fan_count = 1,
+ .paths = { "\\_SB.PCI0.LPCB.EC0.FANS", NULL }
+};
+
+static const struct yogafan_config ideapad_3_15alc6_82ku_cfg = {
+ .multiplier = 100,
+ .fan_count = 2,
+ .paths = { "\\_SB.PCI0.LPC0.EC0.FANS", "\\_SB.PCI0.LPC0.EC0.FA2S" },
+};
static const struct yogafan_config yoga_8bit_fans_cfg = {
.multiplier = 100,
@@ -90,17 +101,6 @@ static const struct yogafan_config yoga_pro_7_14iah10_cfg = {
.paths = { "\\_SB.PC00.LPCB.EC0.FANS", NULL }
};
-/*
- * Lenovo Yoga Pro 9 16IMH9 (83DN) uses the PC00 namespace and has two
- * 8-bit fan tachometer fields.
- */
-static const struct yogafan_config yoga_pro_83dn_cfg = {
- .multiplier = 100,
- .fan_count = 2,
- .paths = { "\\_SB.PC00.LPCB.EC0.FANS",
- "\\_SB.PC00.LPCB.EC0.FA2S" }
-};
-
static void apply_rllag_filter(struct yoga_fan_data *data, int idx, long raw_rpm)
{
ktime_t now = ktime_get_boottime();
@@ -200,6 +200,30 @@ static const struct hwmon_chip_info yoga_fan_chip_info = {
};
static const struct dmi_system_id yogafan_quirks[] = {
+ {
+ .ident = "Lenovo Yoga 740-15IML",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_FAMILY, "Yoga 740-15IML"),
+ },
+ .driver_data = (void *)&yoga_740_15iml_cfg,
+ },
+ {
+ .ident = "Lenovo IdeaPad 3 15ALC6 Ub",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_FAMILY, "IdeaPad 3 15ALC6 Ub"),
+ },
+ .driver_data = (void *)&ideapad_3_15alc6_82ku_cfg,
+ },
+ {
+ .ident = "Yoga 14cACN 2021",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_FAMILY, "Yoga 14cACN 2021"),
+ },
+ .driver_data = (void *)&yoga_8bit_fans_cfg,
+ },
{
.ident = "Lenovo LOQ 15IAX9",
.matches = {
@@ -248,14 +272,6 @@ static const struct dmi_system_id yogafan_quirks[] = {
},
.driver_data = (void *)&xiaoxin_8bit_dual_cfg,
},
- {
- .ident = "Lenovo Yoga Pro 9 16IMH9 (83DN)",
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "83DN"),
- },
- .driver_data = (void *)&yoga_pro_83dn_cfg,
- },
{
.ident = "Lenovo Yoga",
.matches = {
--
2.55.0
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [PATCH] hwmon: (yogafan) Add support for new Lenovo models
2026-09-06 2:10 Sergio Melas
@ 2026-09-06 2:17 ` sashiko-bot
2026-09-06 16:35 ` Guenter Roeck
1 sibling, 0 replies; 12+ messages in thread
From: sashiko-bot @ 2026-09-06 2:17 UTC (permalink / raw)
To: Sergio Melas; +Cc: linux-hwmon
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [High] Regression / Missing Device Support for Lenovo Yoga Pro 9 16IMH9 (83DN)
- [Medium] Casing mismatch for IdeaPad 3 15ALC6 Ub DMI string
- [Low] Redundant DMI quirk for Yoga 14cACN 2021
--
commit 401f8cbc6c1564d4dde7841a9984dbdade60d7ca
Author: Sergio Melas <sergiomelas@gmail.com>
hwmon: (yogafan) Add support for new Lenovo models
This commit adds DMI quirk entries and maps ACPI paths and configurations
for several new Lenovo laptop models. It also shifts towards matching by
DMI product family instead of product name to distinguish internal fan
layouts.
> diff --git a/Documentation/hwmon/yogafan.rst b/Documentation/hwmon/yogafan.rst
> index 9ff5db5dc08ce..a7e628bc3e44f 100644
> --- a/Documentation/hwmon/yogafan.rst
> +++ b/Documentation/hwmon/yogafan.rst
> @@ -85,27 +85,26 @@ immediately to ensure the user knows the fan has stopped.
>
> ::
>
> - MODEL (DMI PN) | FAMILY / SERIES | EC OFFSET | FULL ACPI OBJECT PATH | WIDTH | MULTiplier
> + MODEL (DMI PN) | FAMILY / SERIES | EC OFFSET | FULL ACPI OBJECT PATH | WIDTH | MULTiplier
> ----------------------------------------------------------------------------------------------------
> - 82N7 | Yoga 14cACN | 0x06 | \_SB.PCI0.LPC0.EC0.FANS | 8-bit | 100
> - 80V2 / 81C3 | Yoga 710/720 | 0x06 | \_SB.PCI0.LPC0.EC0.FAN0 | 8-bit | 100
> - 83E2 | Yoga Pro 7 | 0xFE | \_SB.PCI0.LPC0.EC0.FANS | 8-bit | 100
> - 83DN | Yoga Pro 9 16IMH9 | 0x06/0xFE | \_SB.PC00.LPCB.EC0.FANS/FA2S | 8-bit | 100
> + 82N7 | Yoga 14cACN | 0x06 | \_SB.PCI0.LPC0.EC0.FANS | 8-bit | 100
> + 80V2 / 81C3 | Yoga 710/720 | 0x06 | \_SB.PCI0.LPC0.EC0.FAN0 | 8-bit | 100
> + 83E2 / 83DN | Yoga Pro 7/9 | 0xFE | \_SB.PCI0.LPC0.EC0.FANS | 8-bit | 100
[Severity: High]
Does 83DN actually share this ACPI path and single-fan layout with 83E2? The
previous code and documentation indicated it had two fans and used the
\_SB.PC00.LPCB namespace.
[ ... ]
> - 82KU | IdeaPad 3 15ALC6 | 0x06 | \_SB.PCI0.LPC0.EC0.FAN0 | 8-bit | 100
> + 82KU | IdeaPad 3 15ALC6 | 0x06 | \_SB.PCI0.LPC0.EC0.FAN0 | 8-bit | 100
> + 82KU | IdeaPad 3 15ALC6 ub| 0x06 | \_SB.PCI0.LPC0.EC0.FANS/FA2S | 8-bit | 100
[ ... ]
> diff --git a/drivers/hwmon/yogafan.c b/drivers/hwmon/yogafan.c
> index 413ddc721a113..2ce358c74410d 100644
> --- a/drivers/hwmon/yogafan.c
> +++ b/drivers/hwmon/yogafan.c
[ ... ]
> @@ -200,6 +200,30 @@ static const struct hwmon_chip_info yoga_fan_chip_info = {
> };
>
> static const struct dmi_system_id yogafan_quirks[] = {
> + {
> + .ident = "Lenovo Yoga 740-15IML",
> + .matches = {
> + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> + DMI_MATCH(DMI_PRODUCT_FAMILY, "Yoga 740-15IML"),
> + },
> + .driver_data = (void *)&yoga_740_15iml_cfg,
> + },
> + {
> + .ident = "Lenovo IdeaPad 3 15ALC6 Ub",
> + .matches = {
> + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> + DMI_MATCH(DMI_PRODUCT_FAMILY, "IdeaPad 3 15ALC6 Ub"),
> + },
[Severity: Medium]
Is the DMI string casing correct here? The code checks for "Ub" (uppercase U),
but the documentation table added in this same commit lists it as "ub"
(lowercase u). Since DMI_MATCH uses a case-sensitive match, if the hardware
actually uses the lowercase version, this quirk will silently fail to match
and the device will incorrectly fall back to the generic 1-fan profile.
> + .driver_data = (void *)&ideapad_3_15alc6_82ku_cfg,
> + },
> + {
> + .ident = "Yoga 14cACN 2021",
> + .matches = {
> + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> + DMI_MATCH(DMI_PRODUCT_FAMILY, "Yoga 14cACN 2021"),
> + },
> + .driver_data = (void *)&yoga_8bit_fans_cfg,
> + },
[Severity: Low]
Is this specific quirk necessary? The generic "Lenovo Yoga" fallback further
down the list in yogafan_quirks[] already maps to yoga_8bit_fans_cfg. Since
"Yoga" is a substring of this product family, wouldn't it achieve the exact
same behavior without this extra entry?
> {
> .ident = "Lenovo LOQ 15IAX9",
> .matches = {
[ ... ]
> @@ -248,14 +272,6 @@ static const struct dmi_system_id yogafan_quirks[] = {
> },
> .driver_data = (void *)&xiaoxin_8bit_dual_cfg,
> },
> - {
> - .ident = "Lenovo Yoga Pro 9 16IMH9 (83DN)",
> - .matches = {
> - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> - DMI_MATCH(DMI_PRODUCT_NAME, "83DN"),
> - },
> - .driver_data = (void *)&yoga_pro_83dn_cfg,
> - },
[Severity: High]
Was the removal of the 83DN quirk intentional? By removing this without adding
a functional equivalent using DMI_PRODUCT_FAMILY, the Yoga Pro 9 16IMH9 (83DN)
will likely fall back to the generic 'Lenovo Yoga' quirk. That generic quirk
expects the PCI0.LPC0 namespace and 1 fan, whereas 83DN requires the PC00.LPCB
namespace and 2 fans. Will this cause a functional regression for this device?
> {
> .ident = "Lenovo Yoga",
> .matches = {
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260906021023.766992-1-sergiomelas@gmail.com?part=1
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH] hwmon: (yogafan) Add support for new Lenovo models
2026-09-06 2:10 Sergio Melas
2026-09-06 2:17 ` sashiko-bot
@ 2026-09-06 16:35 ` Guenter Roeck
1 sibling, 0 replies; 12+ messages in thread
From: Guenter Roeck @ 2026-09-06 16:35 UTC (permalink / raw)
To: Sergio Melas; +Cc: linux-hwmon, linux-kernel
On 9/5/26 19:10, Sergio Melas wrote:
> Add DMI quirk entries and map correct ACPI paths and configurations for
> additional Lenovo laptop models: Yoga 14cACN 2021, IdeaPad 3 15ALC6 Ub
> and Yoga 740-15IML.
>
> DMI product family matching is finally preferred over product name to
> reliably distinguish identical model numbers with different internal
> fan layouts:
> MODEL (DMI PN) | FAMILY / SERIES | FULL ACPI OBJECT PATH
> 82KU | IdeaPad 3 15ALC6 | \_SB.PCI0.LPC0.EC0.FAN0
> 82KU | IdeaPad 3 15ALC6 ub| \_SB.PCI0.LPC0.EC0.FANS/FA2S
>
> Signed-off-by: Sergio Melas <sergiomelas@gmail.com>
> ---
> Documentation/hwmon/yogafan.rst | 40 +++++++++++------------
> drivers/hwmon/yogafan.c | 58 +++++++++++++++++++++------------
> 2 files changed, 57 insertions(+), 41 deletions(-)
>
> diff --git a/Documentation/hwmon/yogafan.rst b/Documentation/hwmon/yogafan.rst
> index 9ff5db5dc..a7e628bc3 100644
> --- a/Documentation/hwmon/yogafan.rst
> +++ b/Documentation/hwmon/yogafan.rst
> @@ -85,27 +85,26 @@ immediately to ensure the user knows the fan has stopped.
>
> ::
>
> - MODEL (DMI PN) | FAMILY / SERIES | EC OFFSET | FULL ACPI OBJECT PATH | WIDTH | MULTiplier
> + MODEL (DMI PN) | FAMILY / SERIES | EC OFFSET | FULL ACPI OBJECT PATH | WIDTH | MULTiplier
> ----------------------------------------------------------------------------------------------------
> - 82N7 | Yoga 14cACN | 0x06 | \_SB.PCI0.LPC0.EC0.FANS | 8-bit | 100
> - 80V2 / 81C3 | Yoga 710/720 | 0x06 | \_SB.PCI0.LPC0.EC0.FAN0 | 8-bit | 100
> - 83E2 | Yoga Pro 7 | 0xFE | \_SB.PCI0.LPC0.EC0.FANS | 8-bit | 100
> - 83DN | Yoga Pro 9 16IMH9 | 0x06/0xFE | \_SB.PC00.LPCB.EC0.FANS/FA2S | 8-bit | 100
> - 82A2 / 82A3 | Yoga Slim 7 | 0x06 | \_SB.PCI0.LPC0.EC0.FANS | 8-bit | 100
> - 81YM / 82FG | IdeaPad 5 | 0x06 | \_SB.PCI0.LPC0.EC0.FAN0 | 8-bit | 100
> - 82JW / 82JU | Legion 5 (AMD) | 0xFE/0xFF | \_SB.PCI0.LPC0.EC0.FANS (Fan1) | 16-bit | 1
> - 82JW / 82JU | Legion 5 (AMD) | 0xFE/0xFF | \_SB.PCI0.LPC0.EC0.FA2S (Fan2) | 16-bit | 1
> - 82WQ | Legion 7i (Int) | 0xFE/0xFF | \_SB.PCI0.LPC0.EC0.FANS (Fan1) | 16-bit | 1
> - 82WQ | Legion 7i (Int) | 0xFE/0xFF | \_SB.PCI0.LPC0.EC0.FA2S (Fan2) | 16-bit | 1
> - 82XV / 83DV | LOQ 15/16 | 0xFE/0xFF | \_SB.PCI0.LPC0.EC0.FANS /FA2S | 16-bit | 1
> - 83AK | ThinkBook G6 | 0x06 | \_SB.PCI0.LPC0.EC0.FAN0 | 8-bit | 100
> - 81X1 | Flex 5 | 0x06 | \_SB.PCI0.LPC0.EC0.FAN0 | 8-bit | 100
> - 83KF | XiaoXinPro 13ARE | 0x06/0xFE | \_SB.PCI0.LPC0.EC0.FANS/FA2S | 8-bit | 100
> - 82KU | IdeaPad 3 15ALC6 | 0x06 | \_SB.PCI0.LPC0.EC0.FAN0 | 8-bit | 100
> - 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
> - *Legacy* | Pre-2020 Models | 0x06 | \_SB.PCI0.LPC.EC.FAN0 | 8-bit | 100
> + 82N7 | Yoga 14cACN | 0x06 | \_SB.PCI0.LPC0.EC0.FANS | 8-bit | 100
> + 80V2 / 81C3 | Yoga 710/720 | 0x06 | \_SB.PCI0.LPC0.EC0.FAN0 | 8-bit | 100
> + 83E2 / 83DN | Yoga Pro 7/9 | 0xFE | \_SB.PCI0.LPC0.EC0.FANS | 8-bit | 100
This is now combined, taking away the entry for Yoga Pro 9 16IMH9 and with it
0x06 and FA2S. Yet, it is not explained in the commit description.
This is just an example for unexplained changes.
> + 82A2 / 82A3 | Yoga Slim 7 | 0x06 | \_SB.PCI0.LPC0.EC0.FANS | 8-bit | 100
> + 81YM / 82FG | IdeaPad 5 | 0x06 | \_SB.PCI0.LPC0.EC0.FAN0 | 8-bit | 100
> + 82JW / 82JU | Legion 5 (AMD) | 0xFE/0xFF | \_SB.PCI0.LPC0.EC0.FANS/FA2S | 16-bit | 1
> + 82WQ | Legion 7i (Int) | 0xFE/0xFF | \_SB.PCI0.LPC0.EC0.FANS/FA2S | 16-bit | 1
> + 82XV / 83DV | LOQ 15/16 | 0xFE/0xFF | \_SB.PCI0.LPC0.EC0.FANS/FA2S | 16-bit | 1
> + 83AK | ThinkBook G6 | 0x06 | \_SB.PCI0.LPC0.EC0.FAN0 | 8-bit | 100
> + 81TD | Yoga 740-15IML | 0x06 | \_SB.PCI0.LPCB.EC0.FANS | 8-bit | 100
> + 81X1 | Flex 5 | 0x06 | \_SB.PCI0.LPC0.EC0.FAN0 | 8-bit | 100
> + 83KF | XiaoXinPro 13ARE | 0x06/0xFE | \_SB.PCI0.LPC0.EC0.FANS/FA2S | 8-bit | 100
> + 82KU | IdeaPad 3 15ALC6 | 0x06 | \_SB.PCI0.LPC0.EC0.FAN0 | 8-bit | 100
> + 82KU | IdeaPad 3 15ALC6 ub| 0x06 | \_SB.PCI0.LPC0.EC0.FANS/FA2S | 8-bit | 100
> + 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
> + *Legacy* | Pre-2020 Models | 0x06 | \_SB.PCI0.LPC.EC.FAN0 | 8-bit | 100
> ----------------------------------------------------------------------------------------------------
>
This is doing way more than adding support for new devices. The entire array is
not only reformatted but reorganized, and the contents have changed. This makes it
all but impossible to determine what has actually changed and why those changes
were made.
I don't mind cleanups, but please do it with separate patches to distinguish it
from functional changes. One logical change per patch, please.
Also please address the concerns raised by Sashiko.
Thanks,
Guenter
> METHODOLOGY & IDENTIFICATION:
> @@ -159,6 +158,7 @@ Contributors & DSDT Providers:
> - **Sarbajit Sarkar** (Lenovo LOQ 15IAX9)
> - **HinataKato** (XiaoXin Pro 13ARE 2020 - 83KF)
> - **PenPenIsGod** (IdeaPad 3 15ALC6 - 82KU & Legion Pro 7 16AFR10H - 83RU)
> +- **wizard-28** (IdeaPad 3 15ALC6 Ub - 82KU)
> - **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)
> diff --git a/drivers/hwmon/yogafan.c b/drivers/hwmon/yogafan.c
> index 413ddc721..2ce358c74 100644
> --- a/drivers/hwmon/yogafan.c
> +++ b/drivers/hwmon/yogafan.c
> @@ -1,6 +1,6 @@
> // SPDX-License-Identifier: GPL-2.0-only
> -/*
> - * yoga_fan.c - Lenovo Yoga/Legion Fan Hardware Monitoring Driver
> +/**
> + * yogafan.c - Lenovo Yoga/Legion Fan Hardware Monitoring Driver
> *
> * Provides fan speed monitoring for Lenovo Yoga, Legion, and IdeaPad
> * laptops by interfacing with the Embedded Controller (EC) via ACPI.
> @@ -53,6 +53,17 @@ struct yoga_fan_data {
> };
>
> /* Specific configurations mapped via DMI */
> +static const struct yogafan_config yoga_740_15iml_cfg = {
> + .multiplier = 100,
> + .fan_count = 1,
> + .paths = { "\\_SB.PCI0.LPCB.EC0.FANS", NULL }
> +};
> +
> +static const struct yogafan_config ideapad_3_15alc6_82ku_cfg = {
> + .multiplier = 100,
> + .fan_count = 2,
> + .paths = { "\\_SB.PCI0.LPC0.EC0.FANS", "\\_SB.PCI0.LPC0.EC0.FA2S" },
> +};
>
> static const struct yogafan_config yoga_8bit_fans_cfg = {
> .multiplier = 100,
> @@ -90,17 +101,6 @@ static const struct yogafan_config yoga_pro_7_14iah10_cfg = {
> .paths = { "\\_SB.PC00.LPCB.EC0.FANS", NULL }
> };
>
> -/*
> - * Lenovo Yoga Pro 9 16IMH9 (83DN) uses the PC00 namespace and has two
> - * 8-bit fan tachometer fields.
> - */
> -static const struct yogafan_config yoga_pro_83dn_cfg = {
> - .multiplier = 100,
> - .fan_count = 2,
> - .paths = { "\\_SB.PC00.LPCB.EC0.FANS",
> - "\\_SB.PC00.LPCB.EC0.FA2S" }
> -};
> -
> static void apply_rllag_filter(struct yoga_fan_data *data, int idx, long raw_rpm)
> {
> ktime_t now = ktime_get_boottime();
> @@ -200,6 +200,30 @@ static const struct hwmon_chip_info yoga_fan_chip_info = {
> };
>
> static const struct dmi_system_id yogafan_quirks[] = {
> + {
> + .ident = "Lenovo Yoga 740-15IML",
> + .matches = {
> + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> + DMI_MATCH(DMI_PRODUCT_FAMILY, "Yoga 740-15IML"),
> + },
> + .driver_data = (void *)&yoga_740_15iml_cfg,
> + },
> + {
> + .ident = "Lenovo IdeaPad 3 15ALC6 Ub",
> + .matches = {
> + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> + DMI_MATCH(DMI_PRODUCT_FAMILY, "IdeaPad 3 15ALC6 Ub"),
> + },
> + .driver_data = (void *)&ideapad_3_15alc6_82ku_cfg,
> + },
> + {
> + .ident = "Yoga 14cACN 2021",
> + .matches = {
> + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> + DMI_MATCH(DMI_PRODUCT_FAMILY, "Yoga 14cACN 2021"),
> + },
> + .driver_data = (void *)&yoga_8bit_fans_cfg,
> + },
> {
> .ident = "Lenovo LOQ 15IAX9",
> .matches = {
> @@ -248,14 +272,6 @@ static const struct dmi_system_id yogafan_quirks[] = {
> },
> .driver_data = (void *)&xiaoxin_8bit_dual_cfg,
> },
> - {
> - .ident = "Lenovo Yoga Pro 9 16IMH9 (83DN)",
> - .matches = {
> - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> - DMI_MATCH(DMI_PRODUCT_NAME, "83DN"),
> - },
> - .driver_data = (void *)&yoga_pro_83dn_cfg,
> - },
> {
> .ident = "Lenovo Yoga",
> .matches = {
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] hwmon: (yogafan) Add support for new Lenovo models
@ 2026-09-07 11:29 Sergio Melas
2026-09-07 11:38 ` sashiko-bot
2026-09-07 20:45 ` Guenter Roeck
0 siblings, 2 replies; 12+ messages in thread
From: Sergio Melas @ 2026-09-07 11:29 UTC (permalink / raw)
To: Guenter Roeck; +Cc: linux-hwmon, linux-kernel, Sergio Melas
Add DMI quirk entries and map correct ACPI paths and configurations for
additional Lenovo laptop models: Yoga 14cACN 2021, IdeaPad 3 15ALC6 Ub
and Yoga 740-15IML, leveraging DMI product family matching.
Signed-off-by: Sergio Melas <sergiomelas@gmail.com>
---
drivers/hwmon/yogafan.c | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/drivers/hwmon/yogafan.c b/drivers/hwmon/yogafan.c
index 413ddc721..aa3284560 100644
--- a/drivers/hwmon/yogafan.c
+++ b/drivers/hwmon/yogafan.c
@@ -53,6 +53,11 @@ struct yoga_fan_data {
};
/* Specific configurations mapped via DMI */
+static const struct yogafan_config yoga_740_15iml_cfg = {
+ .multiplier = 100,
+ .fan_count = 1,
+ .paths = { "\\_SB.PCI0.LPCB.EC0.FANS", NULL }
+};
static const struct yogafan_config yoga_8bit_fans_cfg = {
.multiplier = 100,
@@ -200,6 +205,30 @@ static const struct hwmon_chip_info yoga_fan_chip_info = {
};
static const struct dmi_system_id yogafan_quirks[] = {
+ {
+ .ident = "Lenovo Yoga 740-15IML",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_FAMILY, "Yoga 740-15IML"),
+ },
+ .driver_data = (void *)&yoga_740_15iml_cfg,
+ },
+ {
+ .ident = "Lenovo IdeaPad 3 15ALC6 Ub",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_FAMILY, "IdeaPad 3 15ALC6 Ub"),
+ },
+ .driver_data = (void *)&xiaoxin_8bit_dual_cfg,
+ },
+ {
+ .ident = "Yoga 14cACN 2021",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_FAMILY, "Yoga 14cACN 2021"),
+ },
+ .driver_data = (void *)&yoga_8bit_fans_cfg,
+ },
{
.ident = "Lenovo LOQ 15IAX9",
.matches = {
--
2.55.0
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [PATCH] hwmon: (yogafan) Add support for new Lenovo models
2026-09-07 11:29 Sergio Melas
@ 2026-09-07 11:38 ` sashiko-bot
2026-09-07 20:45 ` Guenter Roeck
1 sibling, 0 replies; 12+ messages in thread
From: sashiko-bot @ 2026-09-07 11:38 UTC (permalink / raw)
To: Sergio Melas; +Cc: linux-hwmon
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The DMI quirk entry for 'Yoga 14cACN 2021' is completely redundant and duplicates the fallback generic 'Lenovo Yoga' configuration.
--
commit 11ad066ce5492c24b9a778e999582125b519d21a
Author: Sergio Melas <sergiomelas@gmail.com>
hwmon: (yogafan) Add support for new Lenovo models
Add DMI quirk entries and map correct ACPI paths and configurations for
additional Lenovo laptop models: Yoga 14cACN 2021, IdeaPad 3 15ALC6 Ub
and Yoga 740-15IML, leveraging DMI product family matching.
> diff --git a/drivers/hwmon/yogafan.c b/drivers/hwmon/yogafan.c
> index 48fa5148d9e2c..2f86a8f6e0aeb 100644
> --- a/drivers/hwmon/yogafan.c
> +++ b/drivers/hwmon/yogafan.c
[ ... ]
> @@ -189,6 +194,30 @@ static const struct hwmon_chip_info yoga_fan_chip_info = {
> };
>
> static const struct dmi_system_id yogafan_quirks[] = {
[ ... ]
> + {
> + .ident = "Yoga 14cACN 2021",
> + .matches = {
> + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> + DMI_MATCH(DMI_PRODUCT_FAMILY, "Yoga 14cACN 2021"),
> + },
> + .driver_data = (void *)&yoga_8bit_fans_cfg,
> + },
[Severity: Low]
Is this specific DMI entry necessary?
Since DMI_MATCH performs a substring match, it appears any system with a
product family containing "Yoga 14cACN 2021" would already match the
generic "Yoga" fallback entry located later in this same array.
Because both entries map to the exact same yoga_8bit_fans_cfg driver data,
does this addition provide any functional benefit, or does it just
duplicate the existing fallback behavior?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260907112929.1531690-1-sergiomelas@gmail.com?part=1
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH] hwmon: (yogafan) Add support for new Lenovo models
2026-09-07 11:29 Sergio Melas
2026-09-07 11:38 ` sashiko-bot
@ 2026-09-07 20:45 ` Guenter Roeck
1 sibling, 0 replies; 12+ messages in thread
From: Guenter Roeck @ 2026-09-07 20:45 UTC (permalink / raw)
To: Sergio Melas; +Cc: linux-hwmon, linux-kernel
On 9/7/26 04:29, Sergio Melas wrote:
> Add DMI quirk entries and map correct ACPI paths and configurations for
> additional Lenovo laptop models: Yoga 14cACN 2021, IdeaPad 3 15ALC6 Ub
> and Yoga 740-15IML, leveraging DMI product family matching.
>
> Signed-off-by: Sergio Melas <sergiomelas@gmail.com>
> ---
This should be tagged v2, and change log goes here.
Guenter
> drivers/hwmon/yogafan.c | 29 +++++++++++++++++++++++++++++
> 1 file changed, 29 insertions(+)
>
> diff --git a/drivers/hwmon/yogafan.c b/drivers/hwmon/yogafan.c
> index 413ddc721..aa3284560 100644
> --- a/drivers/hwmon/yogafan.c
> +++ b/drivers/hwmon/yogafan.c
> @@ -53,6 +53,11 @@ struct yoga_fan_data {
> };
>
> /* Specific configurations mapped via DMI */
> +static const struct yogafan_config yoga_740_15iml_cfg = {
> + .multiplier = 100,
> + .fan_count = 1,
> + .paths = { "\\_SB.PCI0.LPCB.EC0.FANS", NULL }
> +};
>
> static const struct yogafan_config yoga_8bit_fans_cfg = {
> .multiplier = 100,
> @@ -200,6 +205,30 @@ static const struct hwmon_chip_info yoga_fan_chip_info = {
> };
>
> static const struct dmi_system_id yogafan_quirks[] = {
> + {
> + .ident = "Lenovo Yoga 740-15IML",
> + .matches = {
> + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> + DMI_MATCH(DMI_PRODUCT_FAMILY, "Yoga 740-15IML"),
> + },
> + .driver_data = (void *)&yoga_740_15iml_cfg,
> + },
> + {
> + .ident = "Lenovo IdeaPad 3 15ALC6 Ub",
> + .matches = {
> + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> + DMI_MATCH(DMI_PRODUCT_FAMILY, "IdeaPad 3 15ALC6 Ub"),
> + },
> + .driver_data = (void *)&xiaoxin_8bit_dual_cfg,
> + },
> + {
> + .ident = "Yoga 14cACN 2021",
> + .matches = {
> + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> + DMI_MATCH(DMI_PRODUCT_FAMILY, "Yoga 14cACN 2021"),
> + },
> + .driver_data = (void *)&yoga_8bit_fans_cfg,
> + },
> {
> .ident = "Lenovo LOQ 15IAX9",
> .matches = {
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2026-09-07 20:45 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-06 13:11 [PATCH] hwmon: (yogafan) Add support for new Lenovo models Sergio Melas
2026-08-06 13:24 ` sashiko-bot
2026-08-06 15:44 ` Guenter Roeck
2026-08-06 18:26 ` Sergio Melas
2026-08-06 19:17 ` Guenter Roeck
2026-08-06 19:18 ` Guenter Roeck
-- strict thread matches above, loose matches on Subject: below --
2026-09-06 2:10 Sergio Melas
2026-09-06 2:17 ` sashiko-bot
2026-09-06 16:35 ` Guenter Roeck
2026-09-07 11:29 Sergio Melas
2026-09-07 11:38 ` sashiko-bot
2026-09-07 20:45 ` Guenter Roeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox