Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 348541
b: refs/heads/master
c: 8e2286c
h: refs/heads/master
i:
  348539: 897c473
v: v3
  • Loading branch information
Lee, Chun-Yi authored and Matthew Garrett committed Jan 7, 2013
1 parent 3a0fc99 commit 5e1f25b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 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: f20aaba9819d0801fb1314363f97239da0100bac
refs/heads/master: 8e2286ce073f8f40794669956de8fe92da1d9da0
13 changes: 10 additions & 3 deletions trunk/drivers/platform/x86/acer-wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ static const struct key_entry acer_wmi_keymap[] = {
{KE_IGNORE, 0x63, {KEY_BRIGHTNESSDOWN} },
{KE_KEY, 0x64, {KEY_SWITCHVIDEOMODE} }, /* Display Switch */
{KE_IGNORE, 0x81, {KEY_SLEEP} },
{KE_KEY, 0x82, {KEY_TOUCHPAD_TOGGLE} }, /* Touch Pad On/Off */
{KE_KEY, 0x82, {KEY_TOUCHPAD_TOGGLE} }, /* Touch Pad Toggle */
{KE_KEY, KEY_TOUCHPAD_ON, {KEY_TOUCHPAD_ON} },
{KE_KEY, KEY_TOUCHPAD_OFF, {KEY_TOUCHPAD_OFF} },
{KE_IGNORE, 0x83, {KEY_TOUCHPAD_TOGGLE} },
{KE_END, 0}
};
Expand All @@ -147,6 +149,7 @@ struct event_return_value {
#define ACER_WMID3_GDS_THREEG (1<<6) /* 3G */
#define ACER_WMID3_GDS_WIMAX (1<<7) /* WiMAX */
#define ACER_WMID3_GDS_BLUETOOTH (1<<11) /* BT */
#define ACER_WMID3_GDS_TOUCHPAD (1<<1) /* Touchpad */

struct lm_input_params {
u8 function_num; /* Function Number */
Expand Down Expand Up @@ -1678,6 +1681,7 @@ static void acer_wmi_notify(u32 value, void *context)
acpi_status status;
u16 device_state;
const struct key_entry *key;
u32 scancode;

status = wmi_get_event_data(value, &response);
if (status != AE_OK) {
Expand Down Expand Up @@ -1714,6 +1718,7 @@ static void acer_wmi_notify(u32 value, void *context)
pr_warn("Unknown key number - 0x%x\n",
return_value.key_num);
} else {
scancode = return_value.key_num;
switch (key->keycode) {
case KEY_WLAN:
case KEY_BLUETOOTH:
Expand All @@ -1727,9 +1732,11 @@ static void acer_wmi_notify(u32 value, void *context)
rfkill_set_sw_state(bluetooth_rfkill,
!(device_state & ACER_WMID3_GDS_BLUETOOTH));
break;
case KEY_TOUCHPAD_TOGGLE:
scancode = (device_state & ACER_WMID3_GDS_TOUCHPAD) ?
KEY_TOUCHPAD_ON : KEY_TOUCHPAD_OFF;
}
sparse_keymap_report_entry(acer_wmi_input_dev, key,
1, true);
sparse_keymap_report_event(acer_wmi_input_dev, scancode, 1, true);
}
break;
case WMID_ACCEL_EVENT:
Expand Down

0 comments on commit 5e1f25b

Please sign in to comment.