Skip to contentSkip to conversation

dell-wmi: add a WMI event code for display on/off

PATCH Superseded Alex Hung 2 participants 2 messages Jun 16, 2016 x86 platform drivers

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Alex Hung

author
#0 lore raw

PATCH 1/1 dell-wmi: add a WMI event code for display on/off

Some new Dell AIO systems have a button that generates WMI evnet that is to be used to turn LCD on/off

---
 drivers/platform/x86/dell-wmi.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/platform/x86/dell-wmi.c +3 -0
index 15c6f11..298aba1 100644
@@ -125,6 +125,9 @@ static const struct key_entry dell_wmi_legacy_keymap[] __initconst = {
 	/* Audio panel key */
 	{ KE_IGNORE, 0xe026, { KEY_RESERVED } },
 
+	/* Monitor On/Off Control key */
+	{ KE_KEY, 0xe027, { KEY_DISPLAYTOGGLE } },
+
 	{ KE_IGNORE, 0xe02e, { KEY_VOLUMEDOWN } },
 	{ KE_IGNORE, 0xe030, { KEY_VOLUMEUP } },
 	{ KE_IGNORE, 0xe033, { KEY_KBDILLUMUP } },
Signature · 1 line
2.7.4
#1 lore raw
Quoted 13 lines · On Thursday 16 June 2016 11:25:08 Alex Hung wrote:

Some new Dell AIO systems have a button that generates WMI evnet that is to be used to turn LCD on/off

---
 drivers/platform/x86/dell-wmi.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/platform/x86/dell-wmi.c +0 -0
index 15c6f11..298aba1 100644

drivers/platform/x86/dell-wmi.c static const struct key_entry dell_wmi_legacy_keymap[] __initconst = { · line 133

Quoted 9 lines
drivers/platform/x86/dell-wmi.c +3 -0
@@ -125,6 +125,9 @@ static const struct key_entry dell_wmi_legacy_keymap[] __initconst = {
 	/* Audio panel key */
 	{ KE_IGNORE, 0xe026, { KEY_RESERVED } },
 
+	/* Monitor On/Off Control key */
+	{ KE_KEY, 0xe027, { KEY_DISPLAYTOGGLE } },
+
 	{ KE_IGNORE, 0xe02e, { KEY_VOLUMEDOWN } },
 	{ KE_IGNORE, 0xe030, { KEY_VOLUMEUP } },
 	{ KE_IGNORE, 0xe033, { KEY_KBDILLUMUP } },

Hi! Can you rebase this path on top of my "[PATCH v3 0/4] dell-wmi:
Changes in WMI event code handling" series? As it changes order of keys in that sparse table and your change should be easy to rebase.

After rebasing needs some whitespace changes, but looks good, add my Acked-by.

Signature · 2 lines
Pali Rohár
[email protected]