@@ -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
@@ -354,6 +357,12 @@ static const struct mt_class mt_classes[] = {
354
357
MT_QUIRK_CONTACT_CNT_ACCURATE |
355
358
MT_QUIRK_WIN8_PTP_BUTTONS ,
356
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
+ },
357
366
{ }
358
367
};
359
368
@@ -510,8 +519,9 @@ static struct mt_usages *mt_allocate_usage(struct hid_device *hdev,
510
519
}
511
520
512
521
static struct mt_application * mt_allocate_application (struct mt_device * td ,
513
- unsigned int application )
522
+ struct hid_report * report )
514
523
{
524
+ unsigned int application = report -> application ;
515
525
struct mt_application * mt_application ;
516
526
517
527
mt_application = devm_kzalloc (& td -> hdev -> dev , sizeof (* mt_application ),
@@ -536,26 +546,31 @@ static struct mt_application *mt_allocate_application(struct mt_device *td,
536
546
mt_application -> scantime = DEFAULT_ZERO ;
537
547
mt_application -> raw_cc = DEFAULT_ZERO ;
538
548
mt_application -> quirks = td -> mtclass .quirks ;
549
+ mt_application -> report_id = report -> id ;
539
550
540
551
list_add_tail (& mt_application -> list , & td -> applications );
541
552
542
553
return mt_application ;
543
554
}
544
555
545
556
static struct mt_application * mt_find_application (struct mt_device * td ,
546
- unsigned int application )
557
+ struct hid_report * report )
547
558
{
559
+ unsigned int application = report -> application ;
548
560
struct mt_application * tmp , * mt_application = NULL ;
549
561
550
562
list_for_each_entry (tmp , & td -> applications , list ) {
551
563
if (application == tmp -> application ) {
552
- mt_application = tmp ;
553
- break ;
564
+ if (!(td -> mtclass .quirks & MT_QUIRK_SEPARATE_APP_REPORT ) ||
565
+ tmp -> report_id == report -> id ) {
566
+ mt_application = tmp ;
567
+ break ;
568
+ }
554
569
}
555
570
}
556
571
557
572
if (!mt_application )
558
- mt_application = mt_allocate_application (td , application );
573
+ mt_application = mt_allocate_application (td , report );
559
574
560
575
return mt_application ;
561
576
}
@@ -572,7 +587,7 @@ static struct mt_report_data *mt_allocate_report_data(struct mt_device *td,
572
587
return NULL ;
573
588
574
589
rdata -> report = report ;
575
- rdata -> application = mt_find_application (td , report -> application );
590
+ rdata -> application = mt_find_application (td , report );
576
591
577
592
if (!rdata -> application ) {
578
593
devm_kfree (& td -> hdev -> dev , rdata );
@@ -1562,6 +1577,9 @@ static int mt_input_configured(struct hid_device *hdev, struct hid_input *hi)
1562
1577
case HID_VD_ASUS_CUSTOM_MEDIA_KEYS :
1563
1578
suffix = "Custom Media Keys" ;
1564
1579
break ;
1580
+ case HID_DG_PEN :
1581
+ suffix = "Stylus" ;
1582
+ break ;
1565
1583
default :
1566
1584
suffix = "UNKNOWN" ;
1567
1585
break ;
@@ -2023,6 +2041,10 @@ static const struct hid_device_id mt_devices[] = {
2023
2041
HID_DEVICE (BUS_I2C , HID_GROUP_MULTITOUCH_WIN_8 ,
2024
2042
USB_VENDOR_ID_SYNAPTICS , 0x8323 ) },
2025
2043
2044
+ /* Smart Tech panels */
2045
+ { .driver_data = MT_CLS_SMART_TECH ,
2046
+ MT_USB_DEVICE (0x0b8c , 0x0092 )},
2047
+
2026
2048
/* Stantum panels */
2027
2049
{ .driver_data = MT_CLS_CONFIDENCE ,
2028
2050
MT_USB_DEVICE (USB_VENDOR_ID_STANTUM_STM ,
0 commit comments