@@ -68,6 +68,7 @@ MODULE_LICENSE("GPL");
68
68
#define MT_QUIRK_STICKY_FINGERS BIT(16)
69
69
#define MT_QUIRK_ASUS_CUSTOM_UP BIT(17)
70
70
#define MT_QUIRK_WIN8_PTP_BUTTONS BIT(18)
71
+ #define MT_QUIRK_SEPARATE_APP_REPORT BIT(19)
71
72
72
73
#define MT_INPUTMODE_TOUCHSCREEN 0x02
73
74
#define MT_INPUTMODE_TOUCHPAD 0x03
@@ -103,6 +104,7 @@ struct mt_usages {
103
104
struct mt_application {
104
105
struct list_head list ;
105
106
unsigned int application ;
107
+ unsigned int report_id ;
106
108
struct list_head mt_usages ; /* mt usages list */
107
109
108
110
__s32 quirks ;
@@ -203,6 +205,7 @@ static void mt_post_parse(struct mt_device *td, struct mt_application *app);
203
205
#define MT_CLS_VTL 0x0110
204
206
#define MT_CLS_GOOGLE 0x0111
205
207
#define MT_CLS_RAZER_BLADE_STEALTH 0x0112
208
+ #define MT_CLS_SMART_TECH 0x0113
206
209
207
210
#define MT_DEFAULT_MAXCONTACT 10
208
211
#define MT_MAX_MAXCONTACT 250
@@ -263,7 +266,8 @@ static const struct mt_class mt_classes[] = {
263
266
MT_QUIRK_HOVERING |
264
267
MT_QUIRK_CONTACT_CNT_ACCURATE |
265
268
MT_QUIRK_STICKY_FINGERS |
266
- MT_QUIRK_WIN8_PTP_BUTTONS },
269
+ MT_QUIRK_WIN8_PTP_BUTTONS ,
270
+ .export_all_inputs = true },
267
271
{ .name = MT_CLS_EXPORT_ALL_INPUTS ,
268
272
.quirks = MT_QUIRK_ALWAYS_VALID |
269
273
MT_QUIRK_CONTACT_CNT_ACCURATE ,
@@ -353,6 +357,12 @@ static const struct mt_class mt_classes[] = {
353
357
MT_QUIRK_CONTACT_CNT_ACCURATE |
354
358
MT_QUIRK_WIN8_PTP_BUTTONS ,
355
359
},
360
+ { .name = MT_CLS_SMART_TECH ,
361
+ .quirks = MT_QUIRK_ALWAYS_VALID |
362
+ MT_QUIRK_IGNORE_DUPLICATES |
363
+ MT_QUIRK_CONTACT_CNT_ACCURATE |
364
+ MT_QUIRK_SEPARATE_APP_REPORT ,
365
+ },
356
366
{ }
357
367
};
358
368
@@ -509,8 +519,9 @@ static struct mt_usages *mt_allocate_usage(struct hid_device *hdev,
509
519
}
510
520
511
521
static struct mt_application * mt_allocate_application (struct mt_device * td ,
512
- unsigned int application )
522
+ struct hid_report * report )
513
523
{
524
+ unsigned int application = report -> application ;
514
525
struct mt_application * mt_application ;
515
526
516
527
mt_application = devm_kzalloc (& td -> hdev -> dev , sizeof (* mt_application ),
@@ -535,26 +546,31 @@ static struct mt_application *mt_allocate_application(struct mt_device *td,
535
546
mt_application -> scantime = DEFAULT_ZERO ;
536
547
mt_application -> raw_cc = DEFAULT_ZERO ;
537
548
mt_application -> quirks = td -> mtclass .quirks ;
549
+ mt_application -> report_id = report -> id ;
538
550
539
551
list_add_tail (& mt_application -> list , & td -> applications );
540
552
541
553
return mt_application ;
542
554
}
543
555
544
556
static struct mt_application * mt_find_application (struct mt_device * td ,
545
- unsigned int application )
557
+ struct hid_report * report )
546
558
{
559
+ unsigned int application = report -> application ;
547
560
struct mt_application * tmp , * mt_application = NULL ;
548
561
549
562
list_for_each_entry (tmp , & td -> applications , list ) {
550
563
if (application == tmp -> application ) {
551
- mt_application = tmp ;
552
- break ;
564
+ if (!(td -> mtclass .quirks & MT_QUIRK_SEPARATE_APP_REPORT ) ||
565
+ tmp -> report_id == report -> id ) {
566
+ mt_application = tmp ;
567
+ break ;
568
+ }
553
569
}
554
570
}
555
571
556
572
if (!mt_application )
557
- mt_application = mt_allocate_application (td , application );
573
+ mt_application = mt_allocate_application (td , report );
558
574
559
575
return mt_application ;
560
576
}
@@ -571,7 +587,7 @@ static struct mt_report_data *mt_allocate_report_data(struct mt_device *td,
571
587
return NULL ;
572
588
573
589
rdata -> report = report ;
574
- rdata -> application = mt_find_application (td , report -> application );
590
+ rdata -> application = mt_find_application (td , report );
575
591
576
592
if (!rdata -> application ) {
577
593
devm_kfree (& td -> hdev -> dev , rdata );
@@ -1561,6 +1577,9 @@ static int mt_input_configured(struct hid_device *hdev, struct hid_input *hi)
1561
1577
case HID_VD_ASUS_CUSTOM_MEDIA_KEYS :
1562
1578
suffix = "Custom Media Keys" ;
1563
1579
break ;
1580
+ case HID_DG_PEN :
1581
+ suffix = "Stylus" ;
1582
+ break ;
1564
1583
default :
1565
1584
suffix = "UNKNOWN" ;
1566
1585
break ;
@@ -2022,6 +2041,10 @@ static const struct hid_device_id mt_devices[] = {
2022
2041
HID_DEVICE (BUS_I2C , HID_GROUP_MULTITOUCH_WIN_8 ,
2023
2042
USB_VENDOR_ID_SYNAPTICS , 0x8323 ) },
2024
2043
2044
+ /* Smart Tech panels */
2045
+ { .driver_data = MT_CLS_SMART_TECH ,
2046
+ MT_USB_DEVICE (0x0b8c , 0x0092 )},
2047
+
2025
2048
/* Stantum panels */
2026
2049
{ .driver_data = MT_CLS_CONFIDENCE ,
2027
2050
MT_USB_DEVICE (USB_VENDOR_ID_STANTUM_STM ,
0 commit comments