Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions drivers/platform/x86/acer-wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ static const struct key_entry acer_wmi_keymap[] __initconst = {
{KE_KEY, KEY_TOUCHPAD_OFF, {KEY_TOUCHPAD_OFF} },
{KE_IGNORE, 0x83, {KEY_TOUCHPAD_TOGGLE} },
{KE_KEY, 0x85, {KEY_TOUCHPAD_TOGGLE} },
{KE_KEY, 0x84, {KEY_KEYBOARD_BACKLIGHT_TOGGLE} }, /* Keyboard Backlight Toggle */
{KE_KEY, 0x86, {KEY_WLAN} },
{KE_END, 0}
};
Expand All @@ -153,6 +154,8 @@ struct event_return_value {

#define ACER_WMID3_GDS_TOUCHPAD (1<<1) /* Touchpad */

#define ACER_WMID3_GDS_KEYBOARD_BACKLIGHT (1<<0) /* Keyboard Backlight */

/* Hotkey Customized Setting and Acer Application Status.
* Set Device Default Value and Report Acer Application Status.
* When Acer Application starts, it will run this method to inform
Expand Down Expand Up @@ -1777,6 +1780,9 @@ static void acer_wmi_notify(u32 value, void *context)
case KEY_TOUCHPAD_TOGGLE:
scancode = (device_state & ACER_WMID3_GDS_TOUCHPAD) ?
KEY_TOUCHPAD_ON : KEY_TOUCHPAD_OFF;
case KEY_KEYBOARD_BACKLIGHT_TOGGLE:
scancode = (device_state & ACER_WMID3_GDS_KEYBOARD_BACKLIGHT) ?
KEY_KEYBOARD_BACKLIGHT_ON : KEY_KEYBOARD_BACKLIGHT_OFF;
}
sparse_keymap_report_event(acer_wmi_input_dev, scancode, 1, true);
}
Expand Down