aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorCorentin Chary <corentin.chary@gmail.com>2012-11-29 03:12:38 -0500
committerMatthew Garrett <matthew.garrett@nebula.com>2013-02-27 08:30:37 -0500
commit3ba0302bdd57d225b52c4b4b36975196c1572b3f (patch)
tree38e82b32001decfd5be2244ec9eaff1a12aa2e41 /drivers/platform
parent7517a17c1abfc081d19298459f3d2a0d14a86566 (diff)
asus-wmi: always report brightness key events
Signed-off-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/asus-nb-wmi.c2
-rw-r--r--drivers/platform/x86/asus-wmi.c8
-rw-r--r--drivers/platform/x86/asus-wmi.h2
-rw-r--r--drivers/platform/x86/eeepc-wmi.c2
4 files changed, 10 insertions, 4 deletions
diff --git a/drivers/platform/x86/asus-nb-wmi.c b/drivers/platform/x86/asus-nb-wmi.c
index 9aa6642f1ab0..210b5b872125 100644
--- a/drivers/platform/x86/asus-nb-wmi.c
+++ b/drivers/platform/x86/asus-nb-wmi.c
@@ -190,6 +190,8 @@ static void asus_nb_wmi_quirks(struct asus_wmi_driver *driver)
190} 190}
191 191
192static const struct key_entry asus_nb_wmi_keymap[] = { 192static const struct key_entry asus_nb_wmi_keymap[] = {
193 { KE_KEY, ASUS_WMI_BRN_DOWN, { KEY_BRIGHTNESSDOWN } },
194 { KE_KEY, ASUS_WMI_BRN_UP, { KEY_BRIGHTNESSUP } },
193 { KE_KEY, 0x30, { KEY_VOLUMEUP } }, 195 { KE_KEY, 0x30, { KEY_VOLUMEUP } },
194 { KE_KEY, 0x31, { KEY_VOLUMEDOWN } }, 196 { KE_KEY, 0x31, { KEY_VOLUMEDOWN } },
195 { KE_KEY, 0x32, { KEY_MUTE } }, 197 { KE_KEY, 0x32, { KEY_MUTE } },
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index 208e71c61847..e41eae315852 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -1391,16 +1391,16 @@ static void asus_wmi_notify(u32 value, void *context)
1391 } 1391 }
1392 1392
1393 if (code >= NOTIFY_BRNUP_MIN && code <= NOTIFY_BRNUP_MAX) 1393 if (code >= NOTIFY_BRNUP_MIN && code <= NOTIFY_BRNUP_MAX)
1394 code = NOTIFY_BRNUP_MIN; 1394 code = ASUS_WMI_BRN_UP;
1395 else if (code >= NOTIFY_BRNDOWN_MIN && 1395 else if (code >= NOTIFY_BRNDOWN_MIN &&
1396 code <= NOTIFY_BRNDOWN_MAX) 1396 code <= NOTIFY_BRNDOWN_MAX)
1397 code = NOTIFY_BRNDOWN_MIN; 1397 code = ASUS_WMI_BRN_DOWN;
1398 1398
1399 if (code == NOTIFY_BRNUP_MIN || code == NOTIFY_BRNDOWN_MIN) { 1399 if (code == ASUS_WMI_BRN_DOWN || code == ASUS_WMI_BRN_UP) {
1400 if (!acpi_video_backlight_support()) { 1400 if (!acpi_video_backlight_support()) {
1401 asus_wmi_backlight_notify(asus, orig_code); 1401 asus_wmi_backlight_notify(asus, orig_code);
1402 goto exit;
1402 } 1403 }
1403 goto exit;
1404 } 1404 }
1405 1405
1406 if (is_display_toggle(code) && 1406 if (is_display_toggle(code) &&
diff --git a/drivers/platform/x86/asus-wmi.h b/drivers/platform/x86/asus-wmi.h
index 776524c725de..4da4c8bafe70 100644
--- a/drivers/platform/x86/asus-wmi.h
+++ b/drivers/platform/x86/asus-wmi.h
@@ -30,6 +30,8 @@
30#include <linux/platform_device.h> 30#include <linux/platform_device.h>
31 31
32#define ASUS_WMI_KEY_IGNORE (-1) 32#define ASUS_WMI_KEY_IGNORE (-1)
33#define ASUS_WMI_BRN_DOWN 0x20
34#define ASUS_WMI_BRN_UP 0x2f
33 35
34struct module; 36struct module;
35struct key_entry; 37struct key_entry;
diff --git a/drivers/platform/x86/eeepc-wmi.c b/drivers/platform/x86/eeepc-wmi.c
index 60cb76a5b513..af67e6e56ebb 100644
--- a/drivers/platform/x86/eeepc-wmi.c
+++ b/drivers/platform/x86/eeepc-wmi.c
@@ -63,6 +63,8 @@ MODULE_PARM_DESC(hotplug_wireless,
63#define HOME_RELEASE 0xe5 63#define HOME_RELEASE 0xe5
64 64
65static const struct key_entry eeepc_wmi_keymap[] = { 65static const struct key_entry eeepc_wmi_keymap[] = {
66 { KE_KEY, ASUS_WMI_BRN_DOWN, { KEY_BRIGHTNESSDOWN } },
67 { KE_KEY, ASUS_WMI_BRN_UP, { KEY_BRIGHTNESSUP } },
66 /* Sleep already handled via generic ACPI code */ 68 /* Sleep already handled via generic ACPI code */
67 { KE_KEY, 0x30, { KEY_VOLUMEUP } }, 69 { KE_KEY, 0x30, { KEY_VOLUMEUP } },
68 { KE_KEY, 0x31, { KEY_VOLUMEDOWN } }, 70 { KE_KEY, 0x31, { KEY_VOLUMEDOWN } },