Skip to contentSkip to conversation

Make thinkpad_acpi to support also NEC Lavie X1475JAS

PATCH In review John Chau 2 participants 2 messages May 4, 2025 – May 7, 2025 x86 platform drivers

lore
Share & tools
lore

John Chau

author
#0 lore raw

PATCH 1/1 Make thinkpad_acpi to support also NEC Lavie X1475JAS

This patch changes get_thinkpad_model_data in thinkpad_acpi.c to check for additional vendor name "NEC" in order to support NEC Lavie X1475JAS notebook (and perhaps more).

The reason of this works with minimal changes is because NEC Lavie X1475JAS is a Thinkpad inside. ACPI dumps reveals its OEM ID to be "LENOVO", BIOS version "R2PET30W" matches typical Lenovo BIOS version, the existence of HKEY of LEN0268, with DMI fw string is "R2PHT24W".

I compiled and tested with my own machine, attached the dmesg below as proof of work:

[    6.288932] thinkpad_acpi: ThinkPad ACPI Extras v0.26
[    6.288937] thinkpad_acpi: http://ibm-acpi.sf.net/
[    6.288938] thinkpad_acpi: ThinkPad BIOS R2PET30W (1.11 ), EC R2PHT24W
[    6.307000] thinkpad_acpi: radio switch found; radios are enabled
[    6.307030] thinkpad_acpi: This ThinkPad has standard ACPI backlight brightness control, supported by the ACPI video driver
[    6.307033] thinkpad_acpi: Disabling thinkpad-acpi brightness events by default...
[    6.320322] thinkpad_acpi: rfkill switch tpacpi_bluetooth_sw: radio is unblocked
[    6.371963] thinkpad_acpi: secondary fan control detected & enabled
[    6.391922] thinkpad_acpi: battery 1 registered (start 0, stop 85, behaviours: 0x7)
[    6.398375] input: ThinkPad Extra Buttons as /devices/platform/thinkpad_acpi/input/input13
---
 drivers/platform/x86/thinkpad_acpi.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/platform/x86/thinkpad_acpi.c +2 -0
index 5790095c175e..92b21e49faf6 100644
@@ -11478,6 +11478,8 @@ static int __must_check __init get_thinkpad_model_data(
 		tp->vendor = PCI_VENDOR_ID_IBM;
 	else if (dmi_name_in_vendors("LENOVO"))
 		tp->vendor = PCI_VENDOR_ID_LENOVO;
+	else if (dmi_name_in_vendors("NEC"))
+		tp->vendor = PCI_VENDOR_ID_LENOVO;
 	else
 		return 0;
 
Signature · 1 line
2.43.0
maintainer
#1 lore raw
Quoted 11 lines · John Chau

This patch changes get_thinkpad_model_data in thinkpad_acpi.c to check for additional vendor name "NEC" in order to support NEC Lavie X1475JAS notebook (and perhaps more).

The reason of this works with minimal changes is because NEC Lavie X1475JAS is a Thinkpad inside. ACPI dumps reveals its OEM ID to be "LENOVO", BIOS version "R2PET30W" matches typical Lenovo BIOS version, the existence of HKEY of LEN0268, with DMI fw string is "R2PHT24W".

[...]

Thank you for your contribution, it has been applied to my local review-ilpo-fixes branch. Note it will show up in the public platform-drivers-x86/review-ilpo-fixes branch only once I've pushed my local branch there, which might take a while.

The list of commits applied:
[1/1] Make thinkpad_acpi to support also NEC Lavie X1475JAS

      commit: a032f29a15412fab9f4352e0032836d51420a338

--
i.