hwmon: (yogafan) Fix fan paths for Yoga Pro 7 14IAH10
Subsystems (3)
PATCH 1/1 hwmon: (yogafan) Fix fan paths for Yoga Pro 7 14IAH10
The Yoga Pro 7 14IAH10 entry names \_SB.PC00.LPCB.EC0.FANS, which this machine's DSDT does not have, so probe matches on DMI, fails to resolve the path and returns -ENODEV. The EC exposes its two fan tachometers as FA1S and FA2S, and loq_15iax9_8bit_dual_cfg already describes that layout. Point the entry at it, and update the reference table row to match.
---
Tested on a Lenovo Yoga Pro 7 14IAH10 (83KF), BIOS QGCN35WW. The EC field block declares FA1S at offset 0x104 and FA2S at 0x137, both 8 bits, and FANS does not appear anywhere in the table.
Both fans report after the patch, 0 when stopped and 5600 RPM with the fans driven to maximum through the vendor WMI method. The multiplier stays at 100, and the AML agrees, reading the fields as (FA1S * 0x64) and (FA2S * 0x64).
The table also lists the XiaoXinPro 13ARE as machine type 83KF, which is this machine's DMI product name. I left that row alone.
Documentation/hwmon/yogafan.rst | 3 ++- drivers/hwmon/yogafan.c | 8 +------- 2 files changed, 3 insertions(+), 8 deletions(-)
Documentation/hwmon/yogafan.rst +2 -1
@@ -102,7 +102,8 @@ immediately to ensure the user knows the fan has stopped. 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 + 83KF | Yoga Pro 7 14IAH | 0x104 | \_SB.PC00.LPCB.EC0.FA1S (Fan1) | 8-bit | 100 + 83KF | Yoga Pro 7 14IAH | 0x137 | \_SB.PC00.LPCB.EC0.FA2S (Fan2) | 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 ----------------------------------------------------------------------------------------------------
drivers/hwmon/yogafan.c +1 -7
@@ -84,12 +84,6 @@ static const struct yogafan_config xiaoxin_8bit_dual_cfg = { .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 ();
@@ -227,7 +221,7 @@ static const struct dmi_system_id yogafan_quirks[] = {DMI_MATCH (DMI_SYS_VENDOR ,"LENOVO" ), DMI_MATCH(DMI_PRODUCT_FAMILY, "Yoga Pro 7 14IAH10"), }, - .driver_data = (void *)&yoga_pro_7_14iah10_cfg, + .driver_data = (void *)&loq_15iax9_8bit_dual_cfg, }, { .ident = "Lenovo Yoga 7 16ARP8",
base-commit: 22098763a10d9c13
[email protected]
AI reviewSashiko has reviewed this patch and found no issues. It looks great!
Quoted 8 lines
The Yoga Pro 7 14IAH10 entry names \_SB.PC00.LPCB.EC0.FANS, which this machine's DSDT does not have, so probe matches on DMI, fails to resolve the path and returns
-ENODEV. The EC exposes its two fan tachometers as FA1S and FA2S, andloq_15iax9_8bit_dual_cfgalready describes that layout. Point the entry at it, and update the reference table row to match.Fixes 9c110a467686 ("hwmon: (yogafan) Add support for new Lenovo models")Signed-off-by Navon John Lukose <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great!
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Hi Sergio,
Patchwork has this one as needs-ack, so could you take a look? The current 14IAH10 entry points at a FANS object this machine doesn't have, so the driver returns -ENODEV without any message.
Guenter Roeck
maintainerQuoted 13 lines · Navon John Lukose
The Yoga Pro 7 14IAH10 entry names \_SB.PC00.LPCB.EC0.FANS, which this machine's DSDT does not have, so probe matches on DMI, fails to resolve the path and returns
-ENODEV. The EC exposes its two fan tachometers as FA1S and FA2S, andloq_15iax9_8bit_dual_cfgalready describes that layout. Point the entry at it, and update the reference table row to match.Fixes 9c110a467686 ("hwmon: (yogafan) Add support for new Lenovo models")Signed-off-by Navon John Lukose <[email protected]>---
Tested on a Lenovo Yoga Pro 7 14IAH10 (83KF), BIOS QGCN35WW. The EC field block declares FA1S at offset0x104and FA2S at0x137, both 8 bits, and FANS does not appear anywhere in the table.
Quoted 7 lines
Both fans report after the patch, 0 when stopped and 5600 RPM with the fans driven to maximum through the vendor WMI method. The multiplier stays at 100, and the AML agrees, reading the fields as (FA1S *
0x64) and (FA2S *0x64).The table also lists the XiaoXinPro 13ARE as machine type 83KF, which is this machine's DMI product name. I left that row alone.
I don't have a means to determine if the old entry was wrong, if there are different machines with the same DMI entry and different configurations, or if this patch is wrong. I have not heard back from Sergio. The patch has been pending for more then two months.
I am going to apply this patch, to be released with my next pull request and thus with the 7.4 upstream kernel.
If anyone has objections, please speak up now.
Thanks,
Guenter
Quoted 48 lines
Documentation/hwmon/yogafan.rst | 3 ++- drivers/hwmon/yogafan.c | 8 +------- 2 files changed, 3 insertions(+), 8 deletions(-)base-commit:
22098763a10d9c13Documentation/hwmon/yogafan.rst +2
-1@@ -102,7 +102,8 @@ immediately to ensure the user knows the fan has stopped. 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 + 83KF | Yoga Pro 7 14IAH | 0x104 | \_SB.PC00.LPCB.EC0.FA1S (Fan1) | 8-bit | 100 + 83KF | Yoga Pro 7 14IAH | 0x137 | \_SB.PC00.LPCB.EC0.FA2S (Fan2) | 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 ----------------------------------------------------------------------------------------------------drivers/hwmon/yogafan.c +1
-7@@ -84,12 +84,6 @@ static const struct yogafan_config xiaoxin_8bit_dual_cfg = { .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 ();@@ -227,7 +221,7 @@ static const struct dmi_system_id yogafan_quirks[] = {DMI_MATCH (DMI_SYS_VENDOR ,"LENOVO" ), DMI_MATCH(DMI_PRODUCT_FAMILY, "Yoga Pro 7 14IAH10"), }, - .driver_data = (void *)&yoga_pro_7_14iah10_cfg, + .driver_data = (void *)&loq_15iax9_8bit_dual_cfg, }, { .ident = "Lenovo Yoga 7 16ARP8",