@@ -77,6 +77,7 @@ MODULE_LICENSE("GPL");
7777#define MT_QUIRK_ORIENTATION_INVERT BIT(22)
7878#define MT_QUIRK_APPLE_TOUCHBAR BIT(23)
7979#define MT_QUIRK_YOGABOOK9I BIT(24)
80+ #define MT_QUIRK_KEEP_LATENCY_ON_CLOSE BIT(25)
8081
8182#define MT_INPUTMODE_TOUCHSCREEN 0x02
8283#define MT_INPUTMODE_TOUCHPAD 0x03
@@ -214,6 +215,7 @@ static void mt_post_parse(struct mt_device *td, struct mt_application *app);
214215#define MT_CLS_WIN_8_DISABLE_WAKEUP 0x0016
215216#define MT_CLS_WIN_8_NO_STICKY_FINGERS 0x0017
216217#define MT_CLS_WIN_8_FORCE_MULTI_INPUT_NSMU 0x0018
218+ #define MT_CLS_WIN_8_KEEP_LATENCY_ON_CLOSE 0x0019
217219
218220/* vendor specific classes */
219221#define MT_CLS_3M 0x0101
@@ -335,6 +337,15 @@ static const struct mt_class mt_classes[] = {
335337 MT_QUIRK_CONTACT_CNT_ACCURATE |
336338 MT_QUIRK_WIN8_PTP_BUTTONS ,
337339 .export_all_inputs = true },
340+ { .name = MT_CLS_WIN_8_KEEP_LATENCY_ON_CLOSE ,
341+ .quirks = MT_QUIRK_ALWAYS_VALID |
342+ MT_QUIRK_IGNORE_DUPLICATES |
343+ MT_QUIRK_HOVERING |
344+ MT_QUIRK_CONTACT_CNT_ACCURATE |
345+ MT_QUIRK_STICKY_FINGERS |
346+ MT_QUIRK_WIN8_PTP_BUTTONS |
347+ MT_QUIRK_KEEP_LATENCY_ON_CLOSE ,
348+ .export_all_inputs = true },
338349
339350 /*
340351 * vendor specific classes
@@ -855,7 +866,8 @@ static int mt_touch_input_mapping(struct hid_device *hdev, struct hid_input *hi,
855866 if ((cls -> name == MT_CLS_WIN_8 ||
856867 cls -> name == MT_CLS_WIN_8_FORCE_MULTI_INPUT ||
857868 cls -> name == MT_CLS_WIN_8_FORCE_MULTI_INPUT_NSMU ||
858- cls -> name == MT_CLS_WIN_8_DISABLE_WAKEUP ) &&
869+ cls -> name == MT_CLS_WIN_8_DISABLE_WAKEUP ||
870+ cls -> name == MT_CLS_WIN_8_KEEP_LATENCY_ON_CLOSE ) &&
859871 (field -> application == HID_DG_TOUCHPAD ||
860872 field -> application == HID_DG_TOUCHSCREEN ))
861873 app -> quirks |= MT_QUIRK_CONFIDENCE ;
@@ -1768,7 +1780,8 @@ static int mt_input_configured(struct hid_device *hdev, struct hid_input *hi)
17681780 int ret ;
17691781
17701782 if (td -> is_haptic_touchpad && (td -> mtclass .name == MT_CLS_WIN_8 ||
1771- td -> mtclass .name == MT_CLS_WIN_8_FORCE_MULTI_INPUT )) {
1783+ td -> mtclass .name == MT_CLS_WIN_8_FORCE_MULTI_INPUT ||
1784+ td -> mtclass .name == MT_CLS_WIN_8_KEEP_LATENCY_ON_CLOSE )) {
17721785 if (hid_haptic_input_configured (hdev , td -> haptic , hi ) == 0 )
17731786 td -> is_haptic_touchpad = false;
17741787 } else {
@@ -2081,7 +2094,12 @@ static void mt_on_hid_hw_open(struct hid_device *hdev)
20812094
20822095static void mt_on_hid_hw_close (struct hid_device * hdev )
20832096{
2084- mt_set_modes (hdev , HID_LATENCY_HIGH , TOUCHPAD_REPORT_NONE );
2097+ struct mt_device * td = hid_get_drvdata (hdev );
2098+
2099+ if (td -> mtclass .quirks & MT_QUIRK_KEEP_LATENCY_ON_CLOSE )
2100+ mt_set_modes (hdev , HID_LATENCY_NORMAL , TOUCHPAD_REPORT_NONE );
2101+ else
2102+ mt_set_modes (hdev , HID_LATENCY_HIGH , TOUCHPAD_REPORT_NONE );
20852103}
20862104
20872105/*
@@ -2468,6 +2486,14 @@ static const struct hid_device_id mt_devices[] = {
24682486 MT_USB_DEVICE (USB_VENDOR_ID_UNITEC ,
24692487 USB_DEVICE_ID_UNITEC_USB_TOUCH_0A19 ) },
24702488
2489+ /* Uniwill touchpads */
2490+ { .driver_data = MT_CLS_WIN_8_KEEP_LATENCY_ON_CLOSE ,
2491+ HID_DEVICE (BUS_I2C , HID_GROUP_MULTITOUCH_WIN_8 ,
2492+ USB_VENDOR_ID_PIXART , 0x0255 ) },
2493+ { .driver_data = MT_CLS_WIN_8_KEEP_LATENCY_ON_CLOSE ,
2494+ HID_DEVICE (BUS_I2C , HID_GROUP_MULTITOUCH_WIN_8 ,
2495+ USB_VENDOR_ID_PIXART , 0x0274 ) },
2496+
24712497 /* VTL panels */
24722498 { .driver_data = MT_CLS_VTL ,
24732499 MT_USB_DEVICE (USB_VENDOR_ID_VTL ,
0 commit comments