* [PATCH] dell-wmi: Add KEY_SWITCHVIDEOMODE for Dell N4110.
@ 2014-01-20 15:28 Souvik Banerjee
2014-01-20 15:31 ` Matthew Garrett
0 siblings, 1 reply; 6+ messages in thread
From: Souvik Banerjee @ 2014-01-20 15:28 UTC (permalink / raw)
To: Matthew Garrett, matthew.garrett, linux-kernel
[-- Attachment #1.1: Type: text/plain, Size: 879 bytes --]
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_KEY, 0xe027, { KEY_SWITCHVIDEOMODE } },
+
{ KE_IGNORE, 0xe02e, { KEY_VOLUMEDOWN } },
{ KE_IGNORE, 0xe030, { KEY_VOLUMEUP } },
{ KE_IGNORE, 0xe033, { KEY_KBDILLUMUP } },
--
1.8.5.3
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-dell-wmi-Add-KEY_SWITCHVIDEOMODE-for-Dell-N4110.patch --]
[-- Type: text/x-patch; name="0001-dell-wmi-Add-KEY_SWITCHVIDEOMODE-for-Dell-N4110.patch", Size: 1105 bytes --]
From 66440f78e9989d759be4dd550f76179d8df64083 Mon Sep 17 00:00:00 2001
From: Souvik Banerjee <souvik1997@gmail.com>
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_KEY, 0xe027, { KEY_SWITCHVIDEOMODE } },
+
{ KE_IGNORE, 0xe02e, { KEY_VOLUMEDOWN } },
{ KE_IGNORE, 0xe030, { KEY_VOLUMEUP } },
{ KE_IGNORE, 0xe033, { KEY_KBDILLUMUP } },
--
1.8.5.3
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] dell-wmi: Add KEY_SWITCHVIDEOMODE for Dell N4110.
2014-01-20 15:28 [PATCH] dell-wmi: Add KEY_SWITCHVIDEOMODE for Dell N4110 Souvik Banerjee
@ 2014-01-20 15:31 ` Matthew Garrett
[not found] ` <52DD492F.1060208@gmail.com>
0 siblings, 1 reply; 6+ messages in thread
From: Matthew Garrett @ 2014-01-20 15:31 UTC (permalink / raw)
To: Souvik Banerjee; +Cc: linux-kernel
On Mon, Jan 20, 2014 at 09:28:22AM -0600, Souvik Banerjee wrote:
> 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.
Wouldn't this result in it being reported twice?
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dell-wmi: Add KEY_SWITCHVIDEOMODE for Dell N4110.
[not found] ` <52DD492F.1060208@gmail.com>
@ 2014-01-20 16:06 ` Souvik Banerjee
[not found] ` <20140120161132.GC3844@srcf.ucam.org>
1 sibling, 0 replies; 6+ messages in thread
From: Souvik Banerjee @ 2014-01-20 16:06 UTC (permalink / raw)
To: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 989 bytes --]
Forgot to cc the LKML.
-------- Original Message --------
Subject: Re: [PATCH] dell-wmi: Add KEY_SWITCHVIDEOMODE for Dell N4110.
Date: Mon, 20 Jan 2014 10:05:03 -0600
From: Souvik Banerjee <souvik1997@gmail.com>
To: Matthew Garrett <mjg59@srcf.ucam.org>
No, I don't think so. My testing shows that it is now just reported by
the keyboard controller. My commit is similar to
'f1566f0dc07ec9b5409b348070f5a700032d7881' in which keys for the Dell
XPS L502X are added to the legacy keymap to reduce the noise. Without
this patch dell-wmi reports an unknown key, but with it those messages
are silenced.
--
Souvik Banerjee
On 01/20/2014 09:31 AM, Matthew Garrett wrote:
> On Mon, Jan 20, 2014 at 09:28:22AM -0600, Souvik Banerjee wrote:
>> 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.
>
> Wouldn't this result in it being reported twice?
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dell-wmi: Add KEY_SWITCHVIDEOMODE for Dell N4110.
[not found] ` <20140120161132.GC3844@srcf.ucam.org>
@ 2014-01-20 16:31 ` Souvik Banerjee
2014-01-20 16:37 ` Matthew Garrett
0 siblings, 1 reply; 6+ messages in thread
From: Souvik Banerjee @ 2014-01-20 16:31 UTC (permalink / raw)
To: Matthew Garrett; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 325 bytes --]
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.
--
Souvik Banerjee
On 01/20/2014 10:11 AM, Matthew Garrett wrote:
> Sorry, I missed the KE_IGNORE somehow. This should be fine. Thanks!
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dell-wmi: Add KEY_SWITCHVIDEOMODE for Dell N4110.
2014-01-20 16:31 ` Souvik Banerjee
@ 2014-01-20 16:37 ` Matthew Garrett
2014-01-20 16:46 ` Souvik Banerjee
0 siblings, 1 reply; 6+ messages in thread
From: Matthew Garrett @ 2014-01-20 16:37 UTC (permalink / raw)
To: Souvik Banerjee; +Cc: linux-kernel
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.
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dell-wmi: Add KEY_SWITCHVIDEOMODE for Dell N4110.
2014-01-20 16:37 ` Matthew Garrett
@ 2014-01-20 16:46 ` Souvik Banerjee
0 siblings, 0 replies; 6+ messages in thread
From: Souvik Banerjee @ 2014-01-20 16:46 UTC (permalink / raw)
To: Matthew Garrett; +Cc: linux-kernel
[-- Attachment #1.1: Type: text/plain, Size: 1468 bytes --]
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.
>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-dell-wmi-Add-KEY_SWITCHVIDEOMODE-for-Dell-N4110.patch --]
[-- Type: text/x-patch; name="0001-dell-wmi-Add-KEY_SWITCHVIDEOMODE-for-Dell-N4110.patch", Size: 1108 bytes --]
From 66440f78e9989d759be4dd550f76179d8df64083 Mon Sep 17 00:00:00 2001
From: Souvik Banerjee <souvik1997@gmail.com>
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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-01-20 16:46 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-20 15:28 [PATCH] dell-wmi: Add KEY_SWITCHVIDEOMODE for Dell N4110 Souvik Banerjee
2014-01-20 15:31 ` Matthew Garrett
[not found] ` <52DD492F.1060208@gmail.com>
2014-01-20 16:06 ` Souvik Banerjee
[not found] ` <20140120161132.GC3844@srcf.ucam.org>
2014-01-20 16:31 ` Souvik Banerjee
2014-01-20 16:37 ` Matthew Garrett
2014-01-20 16:46 ` Souvik Banerjee
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).