diff options
| -rw-r--r-- | drivers/misc/hp-wmi.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/misc/hp-wmi.c b/drivers/misc/hp-wmi.c index c6c6d09b376e..6d407c2a4f91 100644 --- a/drivers/misc/hp-wmi.c +++ b/drivers/misc/hp-wmi.c | |||
| @@ -49,6 +49,7 @@ MODULE_ALIAS("wmi:5FB7F034-2C63-45e9-BE91-3D44E2C707E4"); | |||
| 49 | #define HPWMI_ALS_QUERY 0x3 | 49 | #define HPWMI_ALS_QUERY 0x3 |
| 50 | #define HPWMI_DOCK_QUERY 0x4 | 50 | #define HPWMI_DOCK_QUERY 0x4 |
| 51 | #define HPWMI_WIRELESS_QUERY 0x5 | 51 | #define HPWMI_WIRELESS_QUERY 0x5 |
| 52 | #define HPWMI_HOTKEY_QUERY 0xc | ||
| 52 | 53 | ||
| 53 | static int __init hp_wmi_bios_setup(struct platform_device *device); | 54 | static int __init hp_wmi_bios_setup(struct platform_device *device); |
| 54 | static int __exit hp_wmi_bios_remove(struct platform_device *device); | 55 | static int __exit hp_wmi_bios_remove(struct platform_device *device); |
| @@ -69,7 +70,7 @@ struct bios_return { | |||
| 69 | 70 | ||
| 70 | struct key_entry { | 71 | struct key_entry { |
| 71 | char type; /* See KE_* below */ | 72 | char type; /* See KE_* below */ |
| 72 | u8 code; | 73 | u16 code; |
| 73 | u16 keycode; | 74 | u16 keycode; |
| 74 | }; | 75 | }; |
| 75 | 76 | ||
| @@ -79,7 +80,9 @@ static struct key_entry hp_wmi_keymap[] = { | |||
| 79 | {KE_SW, 0x01, SW_DOCK}, | 80 | {KE_SW, 0x01, SW_DOCK}, |
| 80 | {KE_KEY, 0x02, KEY_BRIGHTNESSUP}, | 81 | {KE_KEY, 0x02, KEY_BRIGHTNESSUP}, |
| 81 | {KE_KEY, 0x03, KEY_BRIGHTNESSDOWN}, | 82 | {KE_KEY, 0x03, KEY_BRIGHTNESSDOWN}, |
| 82 | {KE_KEY, 0x04, KEY_HELP}, | 83 | {KE_KEY, 0x20e6, KEY_PROG1}, |
| 84 | {KE_KEY, 0x2142, KEY_MEDIA}, | ||
| 85 | {KE_KEY, 0x231b, KEY_HELP}, | ||
| 83 | {KE_END, 0} | 86 | {KE_END, 0} |
| 84 | }; | 87 | }; |
| 85 | 88 | ||
| @@ -318,6 +321,9 @@ void hp_wmi_notify(u32 value, void *context) | |||
| 318 | 321 | ||
| 319 | if (obj && obj->type == ACPI_TYPE_BUFFER && obj->buffer.length == 8) { | 322 | if (obj && obj->type == ACPI_TYPE_BUFFER && obj->buffer.length == 8) { |
| 320 | int eventcode = *((u8 *) obj->buffer.pointer); | 323 | int eventcode = *((u8 *) obj->buffer.pointer); |
| 324 | if (eventcode == 0x4) | ||
| 325 | eventcode = hp_wmi_perform_query(HPWMI_HOTKEY_QUERY, 0, | ||
| 326 | 0); | ||
| 321 | key = hp_wmi_get_entry_by_scancode(eventcode); | 327 | key = hp_wmi_get_entry_by_scancode(eventcode); |
| 322 | if (key) { | 328 | if (key) { |
| 323 | switch (key->type) { | 329 | switch (key->type) { |
