Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 109418
b: refs/heads/master
c: a8823ae
h: refs/heads/master
v: v3
  • Loading branch information
Matthew Garrett authored and Linus Torvalds committed Sep 3, 2008
1 parent 6bbed39 commit 47c9253
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3f6e2f137c5b83c3c2d48fae971e845c3450cc7c
refs/heads/master: a8823aefd142d2a9c4b3661bf8712ccd2da1b220
10 changes: 8 additions & 2 deletions trunk/drivers/misc/hp-wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ MODULE_ALIAS("wmi:5FB7F034-2C63-45e9-BE91-3D44E2C707E4");
#define HPWMI_ALS_QUERY 0x3
#define HPWMI_DOCK_QUERY 0x4
#define HPWMI_WIRELESS_QUERY 0x5
#define HPWMI_HOTKEY_QUERY 0xc

static int __init hp_wmi_bios_setup(struct platform_device *device);
static int __exit hp_wmi_bios_remove(struct platform_device *device);
Expand All @@ -69,7 +70,7 @@ struct bios_return {

struct key_entry {
char type; /* See KE_* below */
u8 code;
u16 code;
u16 keycode;
};

Expand All @@ -79,7 +80,9 @@ static struct key_entry hp_wmi_keymap[] = {
{KE_SW, 0x01, SW_DOCK},
{KE_KEY, 0x02, KEY_BRIGHTNESSUP},
{KE_KEY, 0x03, KEY_BRIGHTNESSDOWN},
{KE_KEY, 0x04, KEY_HELP},
{KE_KEY, 0x20e6, KEY_PROG1},
{KE_KEY, 0x2142, KEY_MEDIA},
{KE_KEY, 0x231b, KEY_HELP},
{KE_END, 0}
};

Expand Down Expand Up @@ -318,6 +321,9 @@ void hp_wmi_notify(u32 value, void *context)

if (obj && obj->type == ACPI_TYPE_BUFFER && obj->buffer.length == 8) {
int eventcode = *((u8 *) obj->buffer.pointer);
if (eventcode == 0x4)
eventcode = hp_wmi_perform_query(HPWMI_HOTKEY_QUERY, 0,
0);
key = hp_wmi_get_entry_by_scancode(eventcode);
if (key) {
switch (key->type) {
Expand Down

0 comments on commit 47c9253

Please sign in to comment.