hwmon: (yogafan) Support >2 fans and add additional Lenovo laptops
Subsystems (3)
Sergio Melas
maintainercover hwmon: (yogafan) Support >2 fans and add additional Lenovo laptops
Hi Guenter, all,
Apologies for being away over the last few months due to a family illness, and thank you for taking care of the Yoga Pro 7 14IAH10 (83KF) fix in the meantime. I am back actively maintaining yogafan and have audited the pending user-reported DSDT dumps.
This 2-patch series is based on hwmon-next (12c53b6b6):
- Patch 1/2 expands struct yogafan_config.paths from 2 to MAX_FANS (8) and adds the 3rd tachometer field (FASF) for the Legion Pro 7 16AFR10H (83RU).
- Patch 2/2 adds DMI quirks and documentation for 9 user-reported Lenovo laptops (reusing existing yogafan_config structs wherever identical).
To avoid merge conflicts and duplication, this series intentionally does not touch Yoga Pro 7 14IAH10 (83KF, already queued on hwmon fixes) or Yoga 9 2-in-1 14ILL10 (83LC, submitted separately on the list).
Build-tested with W=1, checked with checkpatch.pl --strict --codespell (0 errors, 0 warnings), and documentation verified with SPHINXDIRS=hwmon make htmldocs.
Best regards,
Sergio
Sergio Melas (2):
hwmon: (yogafan) Support more than two fans and add 3rd fan for Legion
Pro 7 16AFR10H
hwmon: (yogafan) Add support for additional Lenovo laptops
Documentation/hwmon/yogafan.rst | 21 ++++++ drivers/hwmon/yogafan.c | 112 +++++++++++++++++++++++++++++++- 2 files changed, 131 insertions(+), 2 deletions(-)
Signature · 1 line
2.55.0
Sergio Melas
maintainerPATCH 1/2 hwmon: (yogafan) Support more than two fans and add 3rd fan for Legion Pro 7 16AFR10H
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.
--- Documentation/hwmon/yogafan.rst | 2 ++ drivers/hwmon/yogafan.c | 12 ++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-)
Documentation/hwmon/yogafan.rst +2 -0
@@ -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)
drivers/hwmon/yogafan.c +10 -2
@@ -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",
Signature · 1 line
2.55.0
Re: [PATCH 1/2] hwmon: (yogafan) Support more than two fans and add 3rd fan for Legion Pro 7 16AFR10H
Quoted 9 lines · Sergio Melas
Expand struct yogafan_config.paths from 2 entries to
MAX_FANS(8) so laptops with more than two fans can be configured, matching structyoga_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 updateDocumentation/hwmon/yogafan.rstaccordingly.Signed-off-by Sergio Melas <[email protected]>
Applied.
Thanks,
Guenter
Sergio Melas
maintainerPATCH 2/2 hwmon: (yogafan) Add support for additional Lenovo laptops
In reply to Sergio MelasAdd DMI quirks and ACPI fan tachometer configurations for nine user-reported Lenovo laptops:
- IdeaPad 3 15ADA6 (82KR): 1 fan, 8-bit x100 (LPC0.EC0.FANS)
- IdeaPad 5 15ARE05 (81YQ): 1 fan, 8-bit x100 (LPC0.EC0.FANS)
- Legion 7 16ACHg6 (82N6): 2 fans, 8-bit x100 (LPC0.EC0.FANS/FA2S)
- Legion Slim 5 14APH8 (82Y5): 2 fans, 8-bit x100 (LPC0.EC0.FANS/FA2S)
- Legion Pro 7 16IAX10H (83F5): 3 fans, 8-bit x100 (PC00 FANS/FA2S/FASF)
- Yoga 7 16IAH7 (82UF): 2 fans, 8-bit x100 (PC00.LPCB.EC0.FANS/FA2S)
- Yoga 730-15IWL (81JS): 1 fan, 8-bit x100 (PCI0.LPCB.EC0.ERPM)
- Yoga Slim 7 15ILL9 (83HM): 2 fans, 16-bit x1 (PC00.LPCB.EC0.FANS/FA2S)
- Yoga Pro 9 16IAH10 (83L0): 2 fans, 16-bit x1 (PC00.LPCB.H_EC.FANS/FA2S)
Reuse existing yogafan_config structures where identical and update Documentation/hwmon/yogafan.rst with the new models and contributors.
--- Documentation/hwmon/yogafan.rst | 19 ++++++ drivers/hwmon/yogafan.c | 100 ++++++++++++++++++++++++++++++++ 2 files changed, 119 insertions(+)
Documentation/hwmon/yogafan.rst +19 -0
@@ -108,6 +108,16 @@ immediately to ensure the user knows the fan has stopped. 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 + 82KR | IdeaPad 3 15ADA6 | 0x06 | \_SB.PCI0.LPC0.EC0.FANS | 8-bit | 100 + 81YQ | IdeaPad 5 15ARE05 | 0x06 | \_SB.PCI0.LPC0.EC0.FANS | 8-bit | 100 + 82N6 | Legion 7 16ACHg6 | 0x06/0xFE | \_SB.PCI0.LPC0.EC0.FANS/FA2S | 8-bit | 100 + 82Y5 | Legion Slim 5 14APH8| 0x06/0xFE | \_SB.PCI0.LPC0.EC0.FANS/FA2S | 8-bit | 100 + 83F5 | Legion Pro 7 16IAX10| 0x03/0x06 | \_SB.PC00.LPCB.EC0.FANS/FA2S | 8-bit | 100 + 83F5 | Legion Pro 7 16IAX10| 0x04 | \_SB.PC00.LPCB.EC0.FASF (Fan3) | 8-bit | 100 + 82UF | Yoga 7 16IAH7 | 0x06/0xFE | \_SB.PC00.LPCB.EC0.FANS/FA2S | 8-bit | 100 + 81JS | YOGA 730-15IWL | 0x06 | \_SB.PCI0.LPCB.EC0.ERPM | 8-bit | 100 + 83HM | Yoga Slim 7 15ILL9 | 0x06/0xFE | \_SB.PC00.LPCB.EC0.FANS/FA2S | 16-bit | 1 + 83L0 | Yoga Pro 9 16IAH10 | 0x5A4 | \_SB.PC00.LPCB.H_EC.FANS/FA2S | 16-bit | 1 *Legacy* | Pre-2020 Models | 0x06 | \_SB.PCI0.LPC.EC.FAN0 | 8-bit | 100 -------------------------------------------------------------------------------------------------------
@@ -167,3 +177,12 @@ Contributors & DSDT Providers: - **Phani Pavan K** (Yoga Pro 7 14IAH10 - 83KF) - **Splarkszter** (Yoga 7 16ARP8 - 83BS) - **GabboRocchia** (Legion Pro 7 16AFR10H - 83RU 3rd fan) +- **dubhater** (IdeaPad 3 15ADA6 - 82KR) +- **Voltair88** (IdeaPad 5 15ARE05 - 81YQ) +- **magnumsolo** (Legion 7 16ACHg6 - 82N6) +- **Dolik64** (Legion Slim 5 14APH8 - 82Y5) +- **rzsn** (Legion Pro 7 16IAX10H - 83F5) +- **slap2572** (Yoga 7 16IAH7 - 82UF) +- **Lassebq** (YOGA 730-15IWL - 81JS) +- **msourada** (Yoga Slim 7 15ILL9 - 83HM) +- **geniusss87** (Yoga Pro 9 16IAH10 - 83L0)
drivers/hwmon/yogafan.c +100 -0
112 lines not on this page · raw message
Signature · 1 line
2.55.0
Re: [PATCH 2/2] hwmon: (yogafan) Add support for additional Lenovo laptops
Quoted 13 lines · Sergio Melas
Add DMI quirks and ACPI fan tachometer configurations for nine user-reported Lenovo laptops:
- IdeaPad 3 15ADA6 (82KR): 1 fan, 8-bit x100 (LPC0.EC0.FANS)
- IdeaPad 5 15ARE05 (81YQ): 1 fan, 8-bit x100 (LPC0.EC0.FANS)
- Legion 7 16ACHg6 (82N6): 2 fans, 8-bit x100 (LPC0.EC0.FANS/FA2S)
- Legion Slim 5 14APH8 (82Y5): 2 fans, 8-bit x100 (LPC0.EC0.FANS/FA2S)
- Legion Pro 7 16IAX10H (83F5): 3 fans, 8-bit x100 (PC00 FANS/FA2S/FASF)
- Yoga 7 16IAH7 (82UF): 2 fans, 8-bit x100 (PC00.LPCB.EC0.FANS/FA2S)
- Yoga 730-15IWL (81JS): 1 fan, 8-bit x100 (PCI0.LPCB.EC0.ERPM)
- Yoga Slim 7 15ILL9 (83HM): 2 fans, 16-bit x1 (PC00.LPCB.EC0.FANS/FA2S)
- Yoga Pro 9 16IAH10 (83L0): 2 fans, 16-bit x1 (PC00.LPCB.H_EC.FANS/FA2S)
Quoted 4 lines
Reuse existing
yogafan_configstructures where identical and updateDocumentation/hwmon/yogafan.rstwith the new models and contributors.Signed-off-by Sergio Melas <[email protected]>
Applied.
Thanks,
Guenter
[email protected]
AI reviewSashiko has reviewed this 2-patch series and found no issues.
Sashiko has reviewed this 2-patch series and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]