Re: [PATCH] dell-wmi: Add KEY_SWITCHVIDEOMODE for Dell N4110.
From: Souvik Banerjee
Date: Mon Jan 20 2014 - 11:46:53 EST
I see. Here's the patch with KE_IGNORE instead of KE_KEY. Does it look ok?
This key is reported by the keyboard controller but also generates WMI
events. By adding it to the legacy keymap the WMI messages can be
silenced.
---
drivers/platform/x86/dell-wmi.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/platform/x86/dell-wmi.c
b/drivers/platform/x86/dell-wmi.c
index 60e0900..72f6cc8 100644
--- a/drivers/platform/x86/dell-wmi.c
+++ b/drivers/platform/x86/dell-wmi.c
@@ -92,6 +92,9 @@ static const struct key_entry dell_wmi_legacy_keymap[]
__initconst = {
{ KE_IGNORE, 0xe025, { KEY_RESERVED } },
{ KE_IGNORE, 0xe026, { KEY_RESERVED } },
+ /* For laptops like the Dell Inspiron N4110 with a monitor hotkey */
+ { KE_IGNORE, 0xe027, { KEY_SWITCHVIDEOMODE } },
+
{ KE_IGNORE, 0xe02e, { KEY_VOLUMEDOWN } },
{ KE_IGNORE, 0xe030, { KEY_VOLUMEUP } },
{ KE_IGNORE, 0xe033, { KEY_KBDILLUMUP } },
--
1.8.5.3
On 01/20/2014 10:37 AM, Matthew Garrett wrote:
> On Mon, Jan 20, 2014 at 10:31:48AM -0600, Souvik Banerjee wrote:
>> I used KE_KEY instead of KE_IGNORE. Should it be changed to KE_IGNORE?
>> On my kernel build with KE_KEY everything works as expected, but I have
>> not tried it with KE_IGNORE.
>
> KE_KEY means that dell-wmi will report the key. If it's also being
> reported via the keyboard controller then it should be KE_IGNORE
> instead.
>
From 66440f78e9989d759be4dd550f76179d8df64083 Mon Sep 17 00:00:00 2001
From: Souvik Banerjee <souvik1997@xxxxxxxxx>
Date: Mon, 20 Jan 2014 09:10:29 -0600
Subject: [PATCH] dell-wmi: Add KEY_SWITCHVIDEOMODE for Dell N4110.
This key is reported by the keyboard controller but also generates WMI
events. By adding it to the legacy keymap the WMI messages can be
silenced.
---
drivers/platform/x86/dell-wmi.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/platform/x86/dell-wmi.c b/drivers/platform/x86/dell-wmi.c
index 60e0900..72f6cc8 100644
--- a/drivers/platform/x86/dell-wmi.c
+++ b/drivers/platform/x86/dell-wmi.c
@@ -92,6 +92,9 @@ static const struct key_entry dell_wmi_legacy_keymap[] __initconst = {
{ KE_IGNORE, 0xe025, { KEY_RESERVED } },
{ KE_IGNORE, 0xe026, { KEY_RESERVED } },
+ /* For laptops like the Dell Inspiron N4110 with a monitor hotkey */
+ { KE_IGNORE, 0xe027, { KEY_SWITCHVIDEOMODE } },
+
{ KE_IGNORE, 0xe02e, { KEY_VOLUMEDOWN } },
{ KE_IGNORE, 0xe030, { KEY_VOLUMEUP } },
{ KE_IGNORE, 0xe033, { KEY_KBDILLUMUP } },
--
1.8.5.3
Attachment:
signature.asc
Description: OpenPGP digital signature