Update the way touchpad is handled to use events from PS/2 instead of WMI
This commit is contained in:
parent
342167062c
commit
71e6e93eb5
|
|
@ -1 +1,2 @@
|
|||
lib/udev/hwdb.d
|
||||
usr/share/initramfs-tools
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnSystem76*:pn*
|
||||
KEYBOARD_KEY_f7=f21
|
||||
KEYBOARD_KEY_f8=f21
|
||||
|
|
@ -134,10 +134,10 @@ static void s76_wmi_notify(u32 value, void *context) {
|
|||
s76_input_airplane_wmi();
|
||||
break;
|
||||
case 0xFC:
|
||||
s76_input_touchpad_wmi(false);
|
||||
// Touchpad WMI (disable)
|
||||
break;
|
||||
case 0xFD:
|
||||
s76_input_touchpad_wmi(true);
|
||||
// Touchpad WMI (enable)
|
||||
break;
|
||||
default:
|
||||
S76_DEBUG("Unknown WMI event code (%x)\n", event);
|
||||
|
|
|
|||
|
|
@ -20,8 +20,6 @@
|
|||
*/
|
||||
|
||||
#define AIRPLANE_KEY KEY_WLAN
|
||||
#define TOUCHPAD_ON_KEY KEY_F21
|
||||
#define TOUCHPAD_OFF_KEY KEY_F21
|
||||
|
||||
static struct input_dev *s76_input_device;
|
||||
static DEFINE_MUTEX(s76_input_report_mutex);
|
||||
|
|
@ -107,16 +105,6 @@ static void s76_input_airplane_wmi(void) {
|
|||
s76_input_key(AIRPLANE_KEY);
|
||||
}
|
||||
|
||||
static void s76_input_touchpad_wmi(bool enabled) {
|
||||
S76_DEBUG("Touchpad Hotkey pressed (WMI) %d\n", enabled);
|
||||
|
||||
if (enabled) {
|
||||
s76_input_key(TOUCHPAD_ON_KEY);
|
||||
} else {
|
||||
s76_input_key(TOUCHPAD_OFF_KEY);
|
||||
}
|
||||
}
|
||||
|
||||
static int s76_input_open(struct input_dev *dev) {
|
||||
s76_input_polling_task = kthread_run(
|
||||
s76_input_polling_thread,
|
||||
|
|
@ -156,8 +144,6 @@ static int __init s76_input_init(struct device *dev) {
|
|||
s76_input_device->dev.parent = dev;
|
||||
set_bit(EV_KEY, s76_input_device->evbit);
|
||||
set_bit(AIRPLANE_KEY, s76_input_device->keybit);
|
||||
set_bit(TOUCHPAD_ON_KEY, s76_input_device->keybit);
|
||||
set_bit(TOUCHPAD_OFF_KEY, s76_input_device->keybit);
|
||||
|
||||
s76_input_device->open = s76_input_open;
|
||||
s76_input_device->close = s76_input_close;
|
||||
|
|
|
|||
Loading…
Reference in New Issue