Skip to contentSkip to conversation

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

PATCH In review Alex Hung 3 participants 4 messages Jun 17, 2016 – Jun 21, 2016 x86 platform drivers

lore
Share & tools
lore

Alex Hung

author
#0 lore raw

PATCH v2 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 b8ad055..8e6c357 100644
@@ -133,6 +133,9 @@ static const struct key_entry dell_wmi_keymap_type_0000[] __initconst = {
 	/* Audio panel key */
 	{ KE_IGNORE, 0xe026, { KEY_RESERVED } },
 
+	/* Monitor On/Off Control key */
+	{ KE_KEY, 0xe027, { KEY_DISPLAYTOGGLE } },
+
 	/* Untested, Multimedia key on Dell Vostro 3560 */
 	/* { KE_IGNORE, 0xe028, { KEY_RESERVED } }, */
 
Signature · 1 line
2.7.4
#1 lore raw
Quoted 14 lines · Alex Hung

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 b8ad055..8e6c357 100644

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

Quoted 4 lines
drivers/platform/x86/dell-wmi.c +1 -0
@@ -133,6 +133,9 @@ static const struct key_entry dell_wmi_keymap_type_0000[] __initconst = {
 	/* Audio panel key */
 	{ KE_IGNORE, 0xe026, { KEY_RESERVED } },
 
+	/* Monitor On/Off Control key */

I've changed this to:

	/* LCD Display On/Off Control Key */

As "Monitor" read like external display to me. I can change this back if you strongly disagree.

Queued for 4.8.

Signature · 2 lines
Darren Hart
Intel Open Source Technology Center
#2 lore raw
In reply to Alex Hung

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

Quoted 6 lines · On Friday 17 June 2016 05:44:27 Alex Hung wrote:
(quoted diff) +0 -0
@@ -133,6 +133,9 @@ static const struct key_entry

dell_wmi_keymap_type_0000[] __initconst = { /* Audio panel key */

drivers/platform/x86/dell-wmi.c +2 -0
 	{ KE_IGNORE, 0xe026, { KEY_RESERVED } },
 
+	/* Monitor On/Off Control key */
+	{ KE_KEY, 0xe027, { KEY_DISPLAYTOGGLE } },

Darren, I would suggest small alignment (as for 0xe026):

{ KE_KEY, 0xe027, { KEY_DISPLAYTOGGLE } },

Quoted 1 line

{ KE_IGNORE, 0xe026, { KEY_RESERVED } },

Signature · 2 lines
Pali Rohár
[email protected]
#3 lore raw
Quoted 9 lines · Pali Rohár

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

Quoted 6 lines · On Friday 17 June 2016 05:44:27 Alex Hung wrote:
(quoted diff) +0 -0
@@ -133,6 +133,9 @@ static const struct key_entry

dell_wmi_keymap_type_0000[] __initconst = { /* Audio panel key */

drivers/platform/x86/dell-wmi.c +2 -0
 	{ KE_IGNORE, 0xe026, { KEY_RESERVED } },
 
+	/* Monitor On/Off Control key */
+	{ KE_KEY, 0xe027, { KEY_DISPLAYTOGGLE } },

Darren, I would suggest small alignment (as for 0xe026):

Done.

Quoted 8 lines
   	{ KE_KEY,    0xe027, { KEY_DISPLAYTOGGLE } },
Quoted 1 line

{ KE_IGNORE, 0xe026, { KEY_RESERVED } },

Signature · 2 lines
Pali Rohár
[email protected]
Signature · 2 lines
Darren Hart
Intel Open Source Technology Center