platform/x86: alienware-wmi-wmax: Extend support to many devices
Subsystems (2)
Kurt Borja
maintainercover platform/x86: alienware-wmi-wmax: Extend support to many devices
Hi all,
After a few months of searching for acpidumps of elegible laptops, I came to the conclusion that if I continue this way, many devices will never get support for this interface. This is due to very few users uploading acpidumps of their machines or contacting me of that matter.
With this patchset, hopefully all (or almost all) elegible devices will get support.
I'm submitting this as an RFC because I'm extending the WMI API and also extending support to many unknown laptops models.
This depends on
platform/x86: alienware-wmi-wmax: HWMON support + DebugFS + Improvements
series, because I made a few generalizations there that work even for Alienware desktops.
---
Kurt Borja (2):
platform/x86: wmi: Add wmidev_get_acpi_device_uid() platform/x86: alienware-wmi-wmax: Check for AWCC support using _UID
drivers/platform/x86/dell/alienware-wmi-wmax.c | 3 +++ drivers/platform/x86/wmi.c | 12 +++++++++--- include/linux/wmi.h | 2 ++ 3 files changed, 14 insertions(+), 3 deletions(-)
---
base-commit: e57eabe2fb044950e6ffdfe01803895043dec0b7
change-id: 20250308-awcc-uid-6ec06bb2572d
prerequisite-change-id: 20250305-hwm-f7bd91902b57:v4
prerequisite-patch-id: 06ff44ce0c6f9bce77eb61a08f358240f1485914
prerequisite-patch-id: d270ae9f1f681a6b6b9685cc13802e8baba0105f
prerequisite-patch-id: 5f744ce03af74a23560118b761ac6529a7c9b172
prerequisite-patch-id: 22c6c5256aee2c17bcd710ec1493b1abccd414cf
prerequisite-patch-id: 75191e2094746de3c12fdd885885d18b2239af89
prerequisite-patch-id: 9f26a3b64824b4f175bbea47c8c9a59fd67f3316
prerequisite-patch-id: 4ff2263e236230e1f96703265d135f0b90390ebd
prerequisite-patch-id: b8844283f8bb46c05ba2e9d7b901bdedfd941731
prerequisite-patch-id: c5122bcce8e7330cdbb18c5d43e321ce69116272
prerequisite-patch-id: ed78dcf947e19652f175d124ade13c08eb3950cc
prerequisite-patch-id: d46a626481e1c49bdd91f6add36f4d6b89edde3e
prerequisite-patch-id: e68a77ec73be34006d5dd754592285e44ffc7f68
Best regards,
Signature · 1 line
~ Kurt
Kurt Borja
maintainerRFC PATCH 1/2 platform/x86: wmi: Add wmidev_get_acpi_device_uid()
Add a non-deprecated version of wmi_get_acpi_device_uid().
--- drivers/platform/x86/wmi.c | 12 +++++++++--- include/linux/wmi.h | 2 ++ 2 files changed, 11 insertions(+), 3 deletions(-)
drivers/platform/x86/wmi.c +9 -3
@@ -636,7 +636,6 @@ EXPORT_SYMBOL_GPL(wmi_has_guid);*/ char *wmi_get_acpi_device_uid (const char *guid_string) { -struct wmi_block *wblock;struct wmi_device *wdev;char *uid;
@@ -644,8 +643,7 @@ char *wmi_get_acpi_device_uid(const char *guid_string)if (IS_ERR (wdev))return NULL ; - wblock = container_of(wdev, struct wmi_block, dev); - uid =acpi_device_uid (wblock->acpi_device); + uid =wmidev_get_acpi_device_uid (wdev);wmi_device_put (wdev);
@@ -653,6 +651,14 @@ char *wmi_get_acpi_device_uid(const char *guid_string) }EXPORT_SYMBOL_GPL (wmi_get_acpi_device_uid); +char *wmidev_get_acpi_device_uid (struct wmi_device *wdev) +{ + struct wmi_block *wblock = container_of(wdev, struct wmi_block, dev); + +return acpi_device_uid (wblock->acpi_device); +} +EXPORT_SYMBOL_GPL (wmidev_get_acpi_device_uid); +/* * sysfs interface */
include/linux/wmi.h +2 -0
@@ -46,6 +46,8 @@ extern union acpi_object *wmidev_block_query(struct wmi_device *wdev,acpi_status wmidev_block_set (struct wmi_device *wdev,u8 instance,const struct acpi_buffer *in); +char *wmidev_get_acpi_device_uid (struct wmi_device *wdev); +u8 wmidev_instance_count (struct wmi_device *wdev);/**
Signature · 1 line
2.48.1
Kurt Borja
maintainerRFC PATCH 2/2 platform/x86: alienware-wmi-wmax: Check for AWCC support using _UID
In reply to Kurt BorjaThe WMAX _UID of all devices that support the AWCC is "AWCC". This includes the following devices which were manually by reading their ACPI tables:
- Dell G16 7630
- Dell G5 5505 SE
- Alienware m16 R1
- Alienware m17 R5 AMD
- Alienware x15 R2
- Alienware 17 R5
- Alienware Aurora R12
- Alienware Aurora Ryzen Edition
And possibly many more, if not all devices with this interface.
Add a check for "AWCC" _UID in wmax_wmi_probe() as a last resort test for support.
--- drivers/platform/x86/dell/alienware-wmi-wmax.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/platform/x86/dell/alienware-wmi-wmax.c +3 -0
@@ -1422,6 +1422,9 @@ static int wmax_wmi_probe(struct wmi_device *wdev, const void *context) };int ret; +if (!awcc && !strncmp (wmidev_get_acpi_device_uid (wdev),"AWCC" ,4 )) + awcc = &generic_quirks; +if (awcc) ret =alienware_awcc_setup (wdev);else
Signature · 1 line
2.48.1