Patchwork [Oneiric] dell-wmi: Add keys for Dell XPS L502X

login
register
mail settings
Submitter Seth Forshee
Date Aug. 8, 2011, 3:35 p.m.
Message ID <20110808153524.GA20776@thinkpad-t410>
Download mbox | patch
Permalink /patch/108981/
State New
Headers show

Comments

Seth Forshee - Aug. 8, 2011, 3:35 p.m.
This patch is far from critical, but since it's trivial I thought I'd go
ahead and send it for oneiric.


From d67aec40ec28b26d1f37b0e2c13723394f0c9ea5 Mon Sep 17 00:00:00 2001
From: Seth Forshee <seth.forshee@canonical.com>
Date: Mon, 1 Aug 2011 15:46:10 -0500
Subject: [PATCH] dell-wmi: Add keys for Dell XPS L502X

All of these keys are being reported on the keyboard
controller but are also generating WMI events. Add them
to the legacy keymap to silence the noise.

(cherry picked from commit f1566f0dc07ec9b5409b348070f5a700032d7881)

BugLink: http://bugs.launchpad.net/bugs/815914
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
---
 drivers/platform/x86/dell-wmi.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
Tim Gardner - Aug. 8, 2011, 4:10 p.m.
On 08/08/2011 09:35 AM, Seth Forshee wrote:
> This patch is far from critical, but since it's trivial I thought I'd go
> ahead and send it for oneiric.
>
>
>  From d67aec40ec28b26d1f37b0e2c13723394f0c9ea5 Mon Sep 17 00:00:00 2001
> From: Seth Forshee<seth.forshee@canonical.com>
> Date: Mon, 1 Aug 2011 15:46:10 -0500
> Subject: [PATCH] dell-wmi: Add keys for Dell XPS L502X
>
> All of these keys are being reported on the keyboard
> controller but are also generating WMI events. Add them
> to the legacy keymap to silence the noise.
>
> (cherry picked from commit f1566f0dc07ec9b5409b348070f5a700032d7881)
>
> BugLink: http://bugs.launchpad.net/bugs/815914
> Signed-off-by: Seth Forshee<seth.forshee@canonical.com>
> Signed-off-by: Matthew Garrett<mjg@redhat.com>
> ---
>   drivers/platform/x86/dell-wmi.c |   10 ++++++++++
>   1 files changed, 10 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/platform/x86/dell-wmi.c b/drivers/platform/x86/dell-wmi.c
> index ce79082..fa9a217 100644
> --- a/drivers/platform/x86/dell-wmi.c
> +++ b/drivers/platform/x86/dell-wmi.c
> @@ -54,6 +54,8 @@ MODULE_ALIAS("wmi:"DELL_EVENT_GUID);
>    */
>
>   static const struct key_entry dell_wmi_legacy_keymap[] __initconst = {
> +	{ KE_IGNORE, 0x003a, { KEY_CAPSLOCK } },
> +
>   	{ KE_KEY, 0xe045, { KEY_PROG1 } },
>   	{ KE_KEY, 0xe009, { KEY_EJECTCD } },
>
> @@ -85,6 +87,11 @@ static const struct key_entry dell_wmi_legacy_keymap[] __initconst = {
>   	{ KE_IGNORE, 0xe013, { KEY_RESERVED } },
>
>   	{ KE_IGNORE, 0xe020, { KEY_MUTE } },
> +
> +	/* Shortcut and audio panel keys */
> +	{ KE_IGNORE, 0xe025, { KEY_RESERVED } },
> +	{ KE_IGNORE, 0xe026, { KEY_RESERVED } },
> +
>   	{ KE_IGNORE, 0xe02e, { KEY_VOLUMEDOWN } },
>   	{ KE_IGNORE, 0xe030, { KEY_VOLUMEUP } },
>   	{ KE_IGNORE, 0xe033, { KEY_KBDILLUMUP } },
> @@ -92,6 +99,9 @@ static const struct key_entry dell_wmi_legacy_keymap[] __initconst = {
>   	{ KE_IGNORE, 0xe03a, { KEY_CAPSLOCK } },
>   	{ KE_IGNORE, 0xe045, { KEY_NUMLOCK } },
>   	{ KE_IGNORE, 0xe046, { KEY_SCROLLLOCK } },
> +	{ KE_IGNORE, 0xe0f7, { KEY_MUTE } },
> +	{ KE_IGNORE, 0xe0f8, { KEY_VOLUMEDOWN } },
> +	{ KE_IGNORE, 0xe0f9, { KEY_VOLUMEUP } },
>   	{ KE_END, 0 }
>   };
>

Patch

diff --git a/drivers/platform/x86/dell-wmi.c b/drivers/platform/x86/dell-wmi.c
index ce79082..fa9a217 100644
--- a/drivers/platform/x86/dell-wmi.c
+++ b/drivers/platform/x86/dell-wmi.c
@@ -54,6 +54,8 @@  MODULE_ALIAS("wmi:"DELL_EVENT_GUID);
  */
 
 static const struct key_entry dell_wmi_legacy_keymap[] __initconst = {
+	{ KE_IGNORE, 0x003a, { KEY_CAPSLOCK } },
+
 	{ KE_KEY, 0xe045, { KEY_PROG1 } },
 	{ KE_KEY, 0xe009, { KEY_EJECTCD } },
 
@@ -85,6 +87,11 @@  static const struct key_entry dell_wmi_legacy_keymap[] __initconst = {
 	{ KE_IGNORE, 0xe013, { KEY_RESERVED } },
 
 	{ KE_IGNORE, 0xe020, { KEY_MUTE } },
+
+	/* Shortcut and audio panel keys */
+	{ KE_IGNORE, 0xe025, { KEY_RESERVED } },
+	{ KE_IGNORE, 0xe026, { KEY_RESERVED } },
+
 	{ KE_IGNORE, 0xe02e, { KEY_VOLUMEDOWN } },
 	{ KE_IGNORE, 0xe030, { KEY_VOLUMEUP } },
 	{ KE_IGNORE, 0xe033, { KEY_KBDILLUMUP } },
@@ -92,6 +99,9 @@  static const struct key_entry dell_wmi_legacy_keymap[] __initconst = {
 	{ KE_IGNORE, 0xe03a, { KEY_CAPSLOCK } },
 	{ KE_IGNORE, 0xe045, { KEY_NUMLOCK } },
 	{ KE_IGNORE, 0xe046, { KEY_SCROLLLOCK } },
+	{ KE_IGNORE, 0xe0f7, { KEY_MUTE } },
+	{ KE_IGNORE, 0xe0f8, { KEY_VOLUMEDOWN } },
+	{ KE_IGNORE, 0xe0f9, { KEY_VOLUMEUP } },
 	{ KE_END, 0 }
 };