Last active
August 29, 2015 14:03
-
-
Save kornyone/879418e1633612aa0427 to your computer and use it in GitHub Desktop.
Linux Surface Pro 3 keyboard/mouse goodness
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # It's quirky, hid-sensor change to resolve boot up errors | |
| # See http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=00478ee8984a80e531ed491eede0459eae07396d for quirk hack in Surface Pro 2 | |
| # hid-microsoft.c entry derived from https://bugzilla.kernel.org/show_bug.cgi?id=64811 | |
| # Be sure to profit | |
| diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h | |
| index 6d00bb9..2fd9d6d 100644 | |
| --- a/drivers/hid/hid-ids.h | |
| +++ b/drivers/hid/hid-ids.h | |
| @@ -637,6 +637,7 @@ | |
| #define USB_DEVICE_ID_MS_SURFACE_PRO_2 0x0799 | |
| #define USB_DEVICE_ID_MS_TOUCH_COVER_2 0x07a7 | |
| #define USB_DEVICE_ID_MS_TYPE_COVER_2 0x07a9 | |
| +#define USB_DEVICE_ID_MS_TYPE_COVER_3 0x07dc | |
| #define USB_VENDOR_ID_MOJO 0x8282 | |
| #define USB_DEVICE_ID_RETRO_ADAPTER 0x3201 | |
| diff --git a/drivers/hid/hid-microsoft.c b/drivers/hid/hid-microsoft.c | |
| index 8ba17a9..e5e3476 100644 | |
| --- a/drivers/hid/hid-microsoft.c | |
| +++ b/drivers/hid/hid-microsoft.c | |
| @@ -274,6 +274,8 @@ static const struct hid_device_id ms_devices[] = { | |
| .driver_data = MS_NOGET }, | |
| { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_COMFORT_MOUSE_4500), | |
| .driver_data = MS_DUPLICATE_USAGES }, | |
| + { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_3), | |
| + .driver_data = 0 }, | |
| { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_PRESENTER_8K_BT), | |
| .driver_data = MS_PRESENTER }, | |
| diff --git a/drivers/hid/hid-sensor-hub.c b/drivers/hid/hid-sensor-hub.c | |
| index a8d5c8f..ba90f41 100644 | |
| --- a/drivers/hid/hid-sensor-hub.c | |
| +++ b/drivers/hid/hid-sensor-hub.c | |
| @@ -720,6 +720,9 @@ static const struct hid_device_id sensor_hub_devices[] = { | |
| { HID_DEVICE(HID_BUS_ANY, HID_GROUP_SENSOR_HUB, USB_VENDOR_ID_TEXAS_INSTRUMENTS, | |
| USB_DEVICE_ID_TEXAS_INSTRUMENTS_LENOVO_YOGA), | |
| .driver_data = HID_SENSOR_HUB_ENUM_QUIRK}, | |
| + { HID_DEVICE(HID_BUS_ANY, HID_GROUP_SENSOR_HUB, USB_VENDOR_ID_MICROSOFT, | |
| + USB_DEVICE_ID_MS_TYPE_COVER_3), | |
| + .driver_data = HID_SENSOR_HUB_ENUM_QUIRK}, | |
| { HID_DEVICE(HID_BUS_ANY, HID_GROUP_SENSOR_HUB, HID_ANY_ID, | |
| HID_ANY_ID) }, | |
| { } | |
| # Add this to evdev.conf | |
| Section "InputClass" | |
| Identifier "Surface Pro 3 cover" | |
| MatchIsPointer "on" | |
| MatchDevicePath "/dev/input/event*" | |
| Driver "evdev" | |
| Option "vendor" "045e" | |
| Option "IgnoreAbsoluteAxes" "True" | |
| EndSection |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment