diff options
author | Pali Rohár <pali.rohar@gmail.com> | 2016-06-15 15:49:11 -0400 |
---|---|---|
committer | Darren Hart <dvhart@linux.intel.com> | 2016-06-17 14:12:44 -0400 |
commit | 6a4d260a63999dae65289e790f7af2ab1e26cd97 (patch) | |
tree | db441825580bb3abeb0978212098957c1fc0b229 | |
parent | 3de59bcd3bebca6ba4827e7b6ce19568f11652b6 (diff) |
dell-wmi: Sort WMI event codes and update comments
For better readability of keymap table, sort events by codes and also
update comments for events to be more informative.
Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Tested-by: Michał Kępień <kernel@kempniu.pl>
Reviewed-by: Michał Kępień <kernel@kempniu.pl>
Tested-by: Gabriele Mazzotta <gabriele.mzt@gmail.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
-rw-r--r-- | drivers/platform/x86/dell-wmi.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/drivers/platform/x86/dell-wmi.c b/drivers/platform/x86/dell-wmi.c index 4d23c910afeb..b3b99709f824 100644 --- a/drivers/platform/x86/dell-wmi.c +++ b/drivers/platform/x86/dell-wmi.c | |||
@@ -88,29 +88,29 @@ static const struct dmi_system_id dell_wmi_smbios_list[] __initconst = { | |||
88 | static const struct key_entry dell_wmi_legacy_keymap[] __initconst = { | 88 | static const struct key_entry dell_wmi_legacy_keymap[] __initconst = { |
89 | { KE_IGNORE, 0x003a, { KEY_CAPSLOCK } }, | 89 | { KE_IGNORE, 0x003a, { KEY_CAPSLOCK } }, |
90 | 90 | ||
91 | { KE_KEY, 0xe009, { KEY_EJECTCD } }, | 91 | /* Key code is followed by brightness level */ |
92 | 92 | { KE_KEY, 0xe005, { KEY_BRIGHTNESSDOWN } }, | |
93 | /* These also contain the brightness level at offset 6 */ | 93 | { KE_KEY, 0xe006, { KEY_BRIGHTNESSUP } }, |
94 | { KE_KEY, 0xe006, { KEY_BRIGHTNESSUP } }, | ||
95 | { KE_KEY, 0xe005, { KEY_BRIGHTNESSDOWN } }, | ||
96 | 94 | ||
97 | /* Battery health status button */ | 95 | /* Battery health status button */ |
98 | { KE_KEY, 0xe007, { KEY_BATTERY } }, | 96 | { KE_KEY, 0xe007, { KEY_BATTERY } }, |
99 | 97 | ||
100 | /* Radio devices state change */ | 98 | /* Radio devices state change, key code is followed by other values */ |
101 | { KE_IGNORE, 0xe008, { KEY_RFKILL } }, | 99 | { KE_IGNORE, 0xe008, { KEY_RFKILL } }, |
102 | 100 | ||
103 | /* The next device is at offset 6, the active devices are at | 101 | { KE_KEY, 0xe009, { KEY_EJECTCD } }, |
104 | offset 8 and the attached devices at offset 10 */ | 102 | |
105 | { KE_KEY, 0xe00b, { KEY_SWITCHVIDEOMODE } }, | 103 | /* Key code is followed by: next, active and attached devices */ |
104 | { KE_KEY, 0xe00b, { KEY_SWITCHVIDEOMODE } }, | ||
106 | 105 | ||
106 | /* Key code is followed by keyboard illumination level */ | ||
107 | { KE_IGNORE, 0xe00c, { KEY_KBDILLUMTOGGLE } }, | 107 | { KE_IGNORE, 0xe00c, { KEY_KBDILLUMTOGGLE } }, |
108 | 108 | ||
109 | /* BIOS error detected */ | 109 | /* BIOS error detected */ |
110 | { KE_IGNORE, 0xe00d, { KEY_RESERVED } }, | 110 | { KE_IGNORE, 0xe00d, { KEY_RESERVED } }, |
111 | 111 | ||
112 | /* Wifi Catcher */ | 112 | /* Wifi Catcher */ |
113 | { KE_KEY, 0xe011, {KEY_PROG2 } }, | 113 | { KE_KEY, 0xe011, { KEY_PROG2 } }, |
114 | 114 | ||
115 | /* Ambient light sensor toggle */ | 115 | /* Ambient light sensor toggle */ |
116 | { KE_IGNORE, 0xe013, { KEY_RESERVED } }, | 116 | { KE_IGNORE, 0xe013, { KEY_RESERVED } }, |
@@ -118,12 +118,14 @@ static const struct key_entry dell_wmi_legacy_keymap[] __initconst = { | |||
118 | { KE_IGNORE, 0xe020, { KEY_MUTE } }, | 118 | { KE_IGNORE, 0xe020, { KEY_MUTE } }, |
119 | 119 | ||
120 | /* Dell Instant Launch key */ | 120 | /* Dell Instant Launch key */ |
121 | { KE_KEY, 0xe025, { KEY_PROG4 } }, | 121 | { KE_KEY, 0xe025, { KEY_PROG4 } }, |
122 | { KE_KEY, 0xe029, { KEY_PROG4 } }, | ||
123 | 122 | ||
124 | /* Audio panel key */ | 123 | /* Audio panel key */ |
125 | { KE_IGNORE, 0xe026, { KEY_RESERVED } }, | 124 | { KE_IGNORE, 0xe026, { KEY_RESERVED } }, |
126 | 125 | ||
126 | /* Dell Instant Launch key */ | ||
127 | { KE_KEY, 0xe029, { KEY_PROG4 } }, | ||
128 | |||
127 | { KE_IGNORE, 0xe02e, { KEY_VOLUMEDOWN } }, | 129 | { KE_IGNORE, 0xe02e, { KEY_VOLUMEDOWN } }, |
128 | { KE_IGNORE, 0xe030, { KEY_VOLUMEUP } }, | 130 | { KE_IGNORE, 0xe030, { KEY_VOLUMEUP } }, |
129 | { KE_IGNORE, 0xe033, { KEY_KBDILLUMUP } }, | 131 | { KE_IGNORE, 0xe033, { KEY_KBDILLUMUP } }, |
@@ -146,6 +148,7 @@ static const struct key_entry dell_wmi_legacy_keymap[] __initconst = { | |||
146 | { KE_IGNORE, 0xe0f7, { KEY_MUTE } }, | 148 | { KE_IGNORE, 0xe0f7, { KEY_MUTE } }, |
147 | { KE_IGNORE, 0xe0f8, { KEY_VOLUMEDOWN } }, | 149 | { KE_IGNORE, 0xe0f8, { KEY_VOLUMEDOWN } }, |
148 | { KE_IGNORE, 0xe0f9, { KEY_VOLUMEUP } }, | 150 | { KE_IGNORE, 0xe0f9, { KEY_VOLUMEUP } }, |
151 | |||
149 | { KE_END, 0 } | 152 | { KE_END, 0 } |
150 | }; | 153 | }; |
151 | 154 | ||