From: Kurt Borja <kuurtb@gmail.com>
To: "Armin Wolf" <W_Armin@gmx.de>,
"Hans de Goede" <hdegoede@redhat.com>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org, Dell.Client.Kernel@dell.com,
Kurt Borja <kuurtb@gmail.com>
Subject: [PATCH RFC v2 2/2] platform/x86: alienware-wmi-wmax: Check for AWCC support using _UID
Date: Sun, 09 Mar 2025 00:13:41 -0500 [thread overview]
Message-ID: <20250309-awcc-uid-v2-2-5338c6380b2f@gmail.com> (raw)
In-Reply-To: <20250309-awcc-uid-v2-0-5338c6380b2f@gmail.com>
The WMAX _UID of all devices that support the AWCC interface is "AWCC".
This includes the following devices which were manually verified 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.
Signed-off-by: Kurt Borja <kuurtb@gmail.com>
---
drivers/platform/x86/dell/alienware-wmi-wmax.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/drivers/platform/x86/dell/alienware-wmi-wmax.c b/drivers/platform/x86/dell/alienware-wmi-wmax.c
index 46d11b200820cdbaa841fc97e33b339fca42104e..1a81373a9d5937b4ff5511ad2061b6dc6e40b810 100644
--- a/drivers/platform/x86/dell/alienware-wmi-wmax.c
+++ b/drivers/platform/x86/dell/alienware-wmi-wmax.c
@@ -1420,14 +1420,17 @@ static int wmax_wmi_probe(struct wmi_device *wdev, const void *context)
.upd_brightness = wmax_wmi_update_brightness,
},
};
- int ret;
+ char *uid;
- if (awcc)
- ret = alienware_awcc_setup(wdev);
- else
- ret = alienware_alienfx_setup(&pdata);
+ if (!awcc) {
+ uid = wmidev_get_acpi_device_uid(wdev);
+ if (!uid || strncmp(uid, "AWCC", 4))
+ return alienware_alienfx_setup(&pdata);
- return ret;
+ awcc = &generic_quirks;
+ }
+
+ return alienware_awcc_setup(wdev);
}
static int wmax_wmi_suspend(struct device *dev)
--
2.48.1
prev parent reply other threads:[~2025-03-09 5:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-09 5:13 [PATCH RFC v2 0/2] platform/x86: alienware-wmi-wmax: Extend support to many devices Kurt Borja
2025-03-09 5:13 ` [PATCH RFC v2 1/2] platform/x86: wmi: Add wmidev_get_acpi_device_uid() Kurt Borja
2025-03-11 19:21 ` Armin Wolf
2025-03-12 5:27 ` Kurt Borja
2025-03-09 5:13 ` Kurt Borja [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250309-awcc-uid-v2-2-5338c6380b2f@gmail.com \
--to=kuurtb@gmail.com \
--cc=Dell.Client.Kernel@dell.com \
--cc=W_Armin@gmx.de \
--cc=hdegoede@redhat.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox