public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] dell-smbios-base: Extends support to Alienware products
@ 2024-10-31 15:40 Kurt Borja
  2024-10-31 15:44 ` [PATCH v2 2/2] dell-wmi-base: Handle META key Lock/Unlock events Kurt Borja
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Kurt Borja @ 2024-10-31 15:40 UTC (permalink / raw)
  To: kuurtb
  Cc: Dell.Client.Kernel, hdegoede, ilpo.jarvinen, linux-kernel, pali,
	platform-driver-x86, w_armin

Fixes the following error:

dell_smbios: Unable to run on non-Dell system

Which is triggered after dell-wmi driver fails to initialize on
Alienware systems, as it depends on dell-smbios.

This effectively extends dell-wmi, dell-smbios and dcdbas support to
Alienware devices, that might share some features of the SMBIOS intereface
calling interface with other Dell products.

Tested on an Alienware X15 R1.

Signed-off-by: Kurt Borja <kuurtb@gmail.com>
---
v2:
 - Commit message reflects Alienware devices may not necessarily support
   the SMBIOS interface
 - Commit message now has "Tested on"
---
 drivers/platform/x86/dell/dell-smbios-base.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/platform/x86/dell/dell-smbios-base.c b/drivers/platform/x86/dell/dell-smbios-base.c
index 73e41eb69..01c72b91a 100644
--- a/drivers/platform/x86/dell/dell-smbios-base.c
+++ b/drivers/platform/x86/dell/dell-smbios-base.c
@@ -576,6 +576,7 @@ static int __init dell_smbios_init(void)
 	int ret, wmi, smm;
 
 	if (!dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "Dell System", NULL) &&
+	    !dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "Alienware", NULL) &&
 	    !dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "www.dell.com", NULL)) {
 		pr_err("Unable to run on non-Dell system\n");
 		return -ENODEV;
-- 
2.47.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v2 2/2] dell-wmi-base: Handle META key Lock/Unlock events
  2024-10-31 15:40 [PATCH v2 1/2] dell-smbios-base: Extends support to Alienware products Kurt Borja
@ 2024-10-31 15:44 ` Kurt Borja
  2024-10-31 15:53   ` Mario Limonciello
  2024-10-31 18:19   ` Pali Rohár
  2024-10-31 15:51 ` [PATCH v2 1/2] dell-smbios-base: Extends support to Alienware products Mario Limonciello
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 7+ messages in thread
From: Kurt Borja @ 2024-10-31 15:44 UTC (permalink / raw)
  To: kuurtb
  Cc: Dell.Client.Kernel, hdegoede, ilpo.jarvinen, linux-kernel, pali,
	platform-driver-x86, w_armin

Some Alienware devices have a key that locks/unlocks the Meta key. This
key triggers a WMI event that should be ignored by the kernel, as it's
handled by internally the firmware.

There is no known way of changing this default behavior. The firmware
would lock/unlock the Meta key, regardless of how the event is handled.

Tested on an Alienware x15 R1.

Signed-off-by: Kurt Borja <kuurtb@gmail.com>
---
v2:
 - Fixed entry style
 - Commit message clarifies firmware behavior
 - Commit message now has "Tested on"
---
 drivers/platform/x86/dell/dell-wmi-base.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/platform/x86/dell/dell-wmi-base.c b/drivers/platform/x86/dell/dell-wmi-base.c
index 502783a7a..ce421e51b 100644
--- a/drivers/platform/x86/dell/dell-wmi-base.c
+++ b/drivers/platform/x86/dell/dell-wmi-base.c
@@ -80,6 +80,12 @@ static const struct dmi_system_id dell_wmi_smbios_list[] __initconst = {
 static const struct key_entry dell_wmi_keymap_type_0000[] = {
 	{ KE_IGNORE, 0x003a, { KEY_CAPSLOCK } },
 
+	/* Meta key lock */
+	{ KE_IGNORE, 0xe000, { KEY_RIGHTMETA } },
+
+	/* Meta key unlock */
+	{ KE_IGNORE, 0xe001, { KEY_RIGHTMETA } },
+
 	/* Key code is followed by brightness level */
 	{ KE_KEY,    0xe005, { KEY_BRIGHTNESSDOWN } },
 	{ KE_KEY,    0xe006, { KEY_BRIGHTNESSUP } },
-- 
2.47.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 1/2] dell-smbios-base: Extends support to Alienware products
  2024-10-31 15:40 [PATCH v2 1/2] dell-smbios-base: Extends support to Alienware products Kurt Borja
  2024-10-31 15:44 ` [PATCH v2 2/2] dell-wmi-base: Handle META key Lock/Unlock events Kurt Borja
@ 2024-10-31 15:51 ` Mario Limonciello
  2024-10-31 18:20 ` Pali Rohár
  2024-11-04 10:13 ` Hans de Goede
  3 siblings, 0 replies; 7+ messages in thread
From: Mario Limonciello @ 2024-10-31 15:51 UTC (permalink / raw)
  To: Kurt Borja
  Cc: Dell.Client.Kernel, hdegoede, ilpo.jarvinen, linux-kernel, pali,
	platform-driver-x86, w_armin

On 10/31/2024 10:40, Kurt Borja wrote:
> Fixes the following error:
> 
> dell_smbios: Unable to run on non-Dell system
> 
> Which is triggered after dell-wmi driver fails to initialize on
> Alienware systems, as it depends on dell-smbios.
> 
> This effectively extends dell-wmi, dell-smbios and dcdbas support to
> Alienware devices, that might share some features of the SMBIOS intereface
> calling interface with other Dell products.
> 
> Tested on an Alienware X15 R1.
> 
> Signed-off-by: Kurt Borja <kuurtb@gmail.com>

Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>

> ---
> v2:
>   - Commit message reflects Alienware devices may not necessarily support
>     the SMBIOS interface
>   - Commit message now has "Tested on"
> ---
>   drivers/platform/x86/dell/dell-smbios-base.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/platform/x86/dell/dell-smbios-base.c b/drivers/platform/x86/dell/dell-smbios-base.c
> index 73e41eb69..01c72b91a 100644
> --- a/drivers/platform/x86/dell/dell-smbios-base.c
> +++ b/drivers/platform/x86/dell/dell-smbios-base.c
> @@ -576,6 +576,7 @@ static int __init dell_smbios_init(void)
>   	int ret, wmi, smm;
>   
>   	if (!dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "Dell System", NULL) &&
> +	    !dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "Alienware", NULL) &&
>   	    !dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "www.dell.com", NULL)) {
>   		pr_err("Unable to run on non-Dell system\n");
>   		return -ENODEV;

There was a really similar change that got committed recently to 
dell-wmi-sysman:

https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/commit/?h=fixes&id=a561509b4187a8908eb7fbb2d1bf35bbc20ec74b

The lines are identical now.  Is it also worth splitting out to a 
helper?  Not sure.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 2/2] dell-wmi-base: Handle META key Lock/Unlock events
  2024-10-31 15:44 ` [PATCH v2 2/2] dell-wmi-base: Handle META key Lock/Unlock events Kurt Borja
@ 2024-10-31 15:53   ` Mario Limonciello
  2024-10-31 18:19   ` Pali Rohár
  1 sibling, 0 replies; 7+ messages in thread
From: Mario Limonciello @ 2024-10-31 15:53 UTC (permalink / raw)
  To: Kurt Borja
  Cc: Dell.Client.Kernel, hdegoede, ilpo.jarvinen, linux-kernel, pali,
	platform-driver-x86, w_armin

On 10/31/2024 10:44, Kurt Borja wrote:
> Some Alienware devices have a key that locks/unlocks the Meta key. This
> key triggers a WMI event that should be ignored by the kernel, as it's
> handled by internally the firmware.
> 
> There is no known way of changing this default behavior. The firmware
> would lock/unlock the Meta key, regardless of how the event is handled.
> 

Thinking through why this event exists, it's probably so that there can 
be a toast message or popup or something similar in Windows to show an 
icon that it was changed, which doesn't currently exist in Linux.

Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>

> Tested on an Alienware x15 R1.
> 
> Signed-off-by: Kurt Borja <kuurtb@gmail.com>
> ---
> v2:
>   - Fixed entry style
>   - Commit message clarifies firmware behavior
>   - Commit message now has "Tested on"
> ---
>   drivers/platform/x86/dell/dell-wmi-base.c | 6 ++++++
>   1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/platform/x86/dell/dell-wmi-base.c b/drivers/platform/x86/dell/dell-wmi-base.c
> index 502783a7a..ce421e51b 100644
> --- a/drivers/platform/x86/dell/dell-wmi-base.c
> +++ b/drivers/platform/x86/dell/dell-wmi-base.c
> @@ -80,6 +80,12 @@ static const struct dmi_system_id dell_wmi_smbios_list[] __initconst = {
>   static const struct key_entry dell_wmi_keymap_type_0000[] = {
>   	{ KE_IGNORE, 0x003a, { KEY_CAPSLOCK } },
>   
> +	/* Meta key lock */
> +	{ KE_IGNORE, 0xe000, { KEY_RIGHTMETA } },
> +
> +	/* Meta key unlock */
> +	{ KE_IGNORE, 0xe001, { KEY_RIGHTMETA } },
> +
>   	/* Key code is followed by brightness level */
>   	{ KE_KEY,    0xe005, { KEY_BRIGHTNESSDOWN } },
>   	{ KE_KEY,    0xe006, { KEY_BRIGHTNESSUP } },


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 2/2] dell-wmi-base: Handle META key Lock/Unlock events
  2024-10-31 15:44 ` [PATCH v2 2/2] dell-wmi-base: Handle META key Lock/Unlock events Kurt Borja
  2024-10-31 15:53   ` Mario Limonciello
@ 2024-10-31 18:19   ` Pali Rohár
  1 sibling, 0 replies; 7+ messages in thread
From: Pali Rohár @ 2024-10-31 18:19 UTC (permalink / raw)
  To: Kurt Borja
  Cc: Dell.Client.Kernel, hdegoede, ilpo.jarvinen, linux-kernel,
	platform-driver-x86, w_armin

On Thursday 31 October 2024 12:44:42 Kurt Borja wrote:
> Some Alienware devices have a key that locks/unlocks the Meta key. This
> key triggers a WMI event that should be ignored by the kernel, as it's
> handled by internally the firmware.
> 
> There is no known way of changing this default behavior. The firmware
> would lock/unlock the Meta key, regardless of how the event is handled.
> 
> Tested on an Alienware x15 R1.
> 
> Signed-off-by: Kurt Borja <kuurtb@gmail.com>

Acked-by: Pali Rohár <pali@kernel.org>

> ---
> v2:
>  - Fixed entry style
>  - Commit message clarifies firmware behavior
>  - Commit message now has "Tested on"
> ---
>  drivers/platform/x86/dell/dell-wmi-base.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/platform/x86/dell/dell-wmi-base.c b/drivers/platform/x86/dell/dell-wmi-base.c
> index 502783a7a..ce421e51b 100644
> --- a/drivers/platform/x86/dell/dell-wmi-base.c
> +++ b/drivers/platform/x86/dell/dell-wmi-base.c
> @@ -80,6 +80,12 @@ static const struct dmi_system_id dell_wmi_smbios_list[] __initconst = {
>  static const struct key_entry dell_wmi_keymap_type_0000[] = {
>  	{ KE_IGNORE, 0x003a, { KEY_CAPSLOCK } },
>  
> +	/* Meta key lock */
> +	{ KE_IGNORE, 0xe000, { KEY_RIGHTMETA } },
> +
> +	/* Meta key unlock */
> +	{ KE_IGNORE, 0xe001, { KEY_RIGHTMETA } },
> +
>  	/* Key code is followed by brightness level */
>  	{ KE_KEY,    0xe005, { KEY_BRIGHTNESSDOWN } },
>  	{ KE_KEY,    0xe006, { KEY_BRIGHTNESSUP } },
> -- 
> 2.47.0
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 1/2] dell-smbios-base: Extends support to Alienware products
  2024-10-31 15:40 [PATCH v2 1/2] dell-smbios-base: Extends support to Alienware products Kurt Borja
  2024-10-31 15:44 ` [PATCH v2 2/2] dell-wmi-base: Handle META key Lock/Unlock events Kurt Borja
  2024-10-31 15:51 ` [PATCH v2 1/2] dell-smbios-base: Extends support to Alienware products Mario Limonciello
@ 2024-10-31 18:20 ` Pali Rohár
  2024-11-04 10:13 ` Hans de Goede
  3 siblings, 0 replies; 7+ messages in thread
From: Pali Rohár @ 2024-10-31 18:20 UTC (permalink / raw)
  To: Kurt Borja
  Cc: Dell.Client.Kernel, hdegoede, ilpo.jarvinen, linux-kernel,
	platform-driver-x86, w_armin

On Thursday 31 October 2024 12:40:24 Kurt Borja wrote:
> Fixes the following error:
> 
> dell_smbios: Unable to run on non-Dell system
> 
> Which is triggered after dell-wmi driver fails to initialize on
> Alienware systems, as it depends on dell-smbios.
> 
> This effectively extends dell-wmi, dell-smbios and dcdbas support to
> Alienware devices, that might share some features of the SMBIOS intereface
> calling interface with other Dell products.
> 
> Tested on an Alienware X15 R1.
> 
> Signed-off-by: Kurt Borja <kuurtb@gmail.com>

Acked-by: Pali Rohár <pali@kernel.org>

> ---
> v2:
>  - Commit message reflects Alienware devices may not necessarily support
>    the SMBIOS interface
>  - Commit message now has "Tested on"
> ---
>  drivers/platform/x86/dell/dell-smbios-base.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/platform/x86/dell/dell-smbios-base.c b/drivers/platform/x86/dell/dell-smbios-base.c
> index 73e41eb69..01c72b91a 100644
> --- a/drivers/platform/x86/dell/dell-smbios-base.c
> +++ b/drivers/platform/x86/dell/dell-smbios-base.c
> @@ -576,6 +576,7 @@ static int __init dell_smbios_init(void)
>  	int ret, wmi, smm;
>  
>  	if (!dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "Dell System", NULL) &&
> +	    !dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "Alienware", NULL) &&
>  	    !dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "www.dell.com", NULL)) {
>  		pr_err("Unable to run on non-Dell system\n");
>  		return -ENODEV;
> -- 
> 2.47.0
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 1/2] dell-smbios-base: Extends support to Alienware products
  2024-10-31 15:40 [PATCH v2 1/2] dell-smbios-base: Extends support to Alienware products Kurt Borja
                   ` (2 preceding siblings ...)
  2024-10-31 18:20 ` Pali Rohár
@ 2024-11-04 10:13 ` Hans de Goede
  3 siblings, 0 replies; 7+ messages in thread
From: Hans de Goede @ 2024-11-04 10:13 UTC (permalink / raw)
  To: Kurt Borja
  Cc: Dell.Client.Kernel, ilpo.jarvinen, linux-kernel, pali,
	platform-driver-x86, w_armin

Hi,

On 31-Oct-24 4:40 PM, Kurt Borja wrote:
> Fixes the following error:
> 
> dell_smbios: Unable to run on non-Dell system
> 
> Which is triggered after dell-wmi driver fails to initialize on
> Alienware systems, as it depends on dell-smbios.
> 
> This effectively extends dell-wmi, dell-smbios and dcdbas support to
> Alienware devices, that might share some features of the SMBIOS intereface
> calling interface with other Dell products.
> 
> Tested on an Alienware X15 R1.
> 
> Signed-off-by: Kurt Borja <kuurtb@gmail.com>

Thank you for your patches, I've applied both patches to
my review-hans branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans

Note they will show up in my review-hans branch once I've pushed my
local branch there, which might take a while.

I will include these patches in my next fixes pull-req to Linus
for the current kernel development cycle.

Regards,

Hans

>
> ---
> v2:
>  - Commit message reflects Alienware devices may not necessarily support
>    the SMBIOS interface
>  - Commit message now has "Tested on"
> ---
>  drivers/platform/x86/dell/dell-smbios-base.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/platform/x86/dell/dell-smbios-base.c b/drivers/platform/x86/dell/dell-smbios-base.c
> index 73e41eb69..01c72b91a 100644
> --- a/drivers/platform/x86/dell/dell-smbios-base.c
> +++ b/drivers/platform/x86/dell/dell-smbios-base.c
> @@ -576,6 +576,7 @@ static int __init dell_smbios_init(void)
>  	int ret, wmi, smm;
>  
>  	if (!dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "Dell System", NULL) &&
> +	    !dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "Alienware", NULL) &&
>  	    !dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "www.dell.com", NULL)) {
>  		pr_err("Unable to run on non-Dell system\n");
>  		return -ENODEV;


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-11-04 10:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-31 15:40 [PATCH v2 1/2] dell-smbios-base: Extends support to Alienware products Kurt Borja
2024-10-31 15:44 ` [PATCH v2 2/2] dell-wmi-base: Handle META key Lock/Unlock events Kurt Borja
2024-10-31 15:53   ` Mario Limonciello
2024-10-31 18:19   ` Pali Rohár
2024-10-31 15:51 ` [PATCH v2 1/2] dell-smbios-base: Extends support to Alienware products Mario Limonciello
2024-10-31 18:20 ` Pali Rohár
2024-11-04 10:13 ` Hans de Goede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox