Skip to contentSkip to conversation

hwmon: (yogafan) Add support for Lenovo LOQ 15IAX9

PATCH Applied Sarbajit Sarkar 4 participants 4 messages Jul 9 – Jul 13

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hwmon: (yogafan) Add support for Lenovo LOQ 15IAX9

Add the Lenovo LOQ 15IAX9 product family to the yogafan dmi_system_id table. Unlike the Legion series, ACPI table extraction reveals this LOQ utilizes an 8-bit EC architecture with a 100x multiplier, but maintains a dual-fan setup via the \_SB.PC00.LPCB.EC0.FA1S and FA2S paths.

A new loq_15iax9_8bit_dual_cfg structure was added to properly map these hardware registers and calculate RPMs correctly while avoiding path conflicts with AMD-based LOQ variants.

---
 drivers/hwmon/yogafan.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
drivers/hwmon/yogafan.c +14 -0
index 605cc92..0a41b86 100644
@@ -71,6 +71,12 @@ static const struct yogafan_config legion_16bit_dual_cfg = {
 	.paths = { "\\_SB.PCI0.LPC0.EC0.FANS", "\\_SB.PCI0.LPC0.EC0.FA2S" }
 };
 
+static const struct yogafan_config loq_15iax9_8bit_dual_cfg = {
+	.multiplier = 100,
+	.fan_count = 2,
+	.paths = { "\\_SB.PC00.LPCB.EC0.FA1S", "\\_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();
@@ -194,6 +200,14 @@ 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);
Signature · 1 line
2.55.0
#1 lore raw
Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 10 lines

Add the Lenovo LOQ 15IAX9 product family to the yogafan dmi_system_id table. Unlike the Legion series, ACPI table extraction reveals this LOQ utilizes an 8-bit EC architecture with a 100x multiplier, but maintains a dual-fan setup via the \_SB.PC00.LPCB.EC0.FA1S and FA2S paths.

A new loq_15iax9_8bit_dual_cfg structure was added to properly map these hardware registers and calculate RPMs correctly while avoiding path conflicts with AMD-based LOQ variants.

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
maintainer Applied
#2 lore raw
In reply to Sarbajit Sarkar
Quoted 10 lines · Sarbajit Sarkar

Add the Lenovo LOQ 15IAX9 product family to the yogafan dmi_system_id table. Unlike the Legion series, ACPI table extraction reveals this LOQ utilizes an 8-bit EC architecture with a 100x multiplier, but maintains a dual-fan setup via the \_SB.PC00.LPCB.EC0.FA1S and FA2S paths.

A new loq_15iax9_8bit_dual_cfg structure was added to properly map these hardware registers and calculate RPMs correctly while avoiding path conflicts with AMD-based LOQ variants.

Applied.

Thanks,
Guenter

maintainer
#3 lore raw

Hi Sarbajit, Thanks for submitting the LOQ 15IAX9 support and mapping the 8-bit dual-fan paths. It's a great addition to the driver. I will rebase my local workspace to include your changes for the next refactor. Best regards, Sergio Melas

Quoted 17 lines · Guenter Roeck
Quoted 10 lines · Sarbajit Sarkar

Add the Lenovo LOQ 15IAX9 product family to the yogafan dmi_system_id table. Unlike the Legion series, ACPI table extraction reveals this LOQ utilizes an 8-bit EC architecture with a 100x multiplier, but maintains a dual-fan setup via the \_SB.PC00.LPCB.EC0.FA1S and FA2S paths.

A new loq_15iax9_8bit_dual_cfg structure was added to properly map these hardware registers and calculate RPMs correctly while avoiding path conflicts with AMD-based LOQ variants.

Applied.

Thanks,
Guenter