wulf7 / iichid

Generic HID layer for FreeBSD. Including I2C and USB backends.
BSD 2-Clause "Simplified" License
45 stars 6 forks source link

DRAFT - Modify hmt to work with certain touch devices #57

Closed MrLightningBolt closed 3 years ago

MrLightningBolt commented 3 years ago

As found in the LG Gram 15Z980-R.AAS9U1:

04CA:00A0 touchpad 1FD2:7012 touchscreen

Both devices report non-absolute usages which hmt ignores. This change accepts all defined hid_input usages rather than only absolute values and allows these devices to work correctly.

I'm opening this as an example but I don't have other hardware I can test to validate if this is a correct change or not. I haven't found anything in the Microsoft I2C HID spec that says that these devices must or should only report absolute usages but that doesn't mean this might not hurt other devices.

wulf7 commented 3 years ago

Could you provide HID report descriptor of both devices?

It can be obtained with hid-recorder utility from sysutils/hid-tools (don't select MANPAGES if you are installing from ports as manpage converter depends on haskel compiler)

Install it than run # hid-recorder /dev/hidraw#[1] to obtain decoded report descriptor and post it here.

[1] # - is a unit number of device nide

MrLightningBolt commented 3 years ago
# 04CA00A0:00 04CA:00A0
# 0x05, 0x0d,                    // Usage Page (Digitizers)             0
# 0x09, 0x05,                    // Usage (Touch Pad)                   2
# 0xa1, 0x01,                    // Collection (Application)            4
# 0x85, 0x01,                    //  Report ID (1)                      6
# 0x05, 0x0d,                    //  Usage Page (Digitizers)            8
# 0x09, 0x22,                    //  Usage (Finger)                     10
# 0xa1, 0x02,                    //  Collection (Logical)               12
# 0x15, 0x00,                    //   Logical Minimum (0)               14
# 0x25, 0x01,                    //   Logical Maximum (1)               16
# 0x09, 0x47,                    //   Usage (Confidence)                18
# 0x09, 0x42,                    //   Usage (Tip Switch)                20
# 0x95, 0x02,                    //   Report Count (2)                  22
# 0x75, 0x01,                    //   Report Size (1)                   24
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              26
# 0x95, 0x01,                    //   Report Count (1)                  28
# 0x75, 0x03,                    //   Report Size (3)                   30
# 0x25, 0x04,                    //   Logical Maximum (4)               32
# 0x09, 0x51,                    //   Usage (Contact Id)                34
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              36
# 0x75, 0x01,                    //   Report Size (1)                   38
# 0x95, 0x03,                    //   Report Count (3)                  40
# 0x81, 0x03,                    //   Input (Cnst,Var,Abs)              42
# 0x05, 0x01,                    //   Usage Page (Generic Desktop)      44
# 0x15, 0x00,                    //   Logical Minimum (0)               46
# 0x26, 0x4d, 0x05,              //   Logical Maximum (1357)            48
# 0x75, 0x10,                    //   Report Size (16)                  51
# 0x55, 0x0e,                    //   Unit Exponent (-2)                53
# 0x65, 0x11,                    //   Unit (Centimeter,SILinear)        55
# 0x09, 0x30,                    //   Usage (X)                         57
# 0x35, 0x00,                    //   Physical Minimum (0)              59
# 0x46, 0xda, 0x03,              //   Physical Maximum (986)            61
# 0x95, 0x01,                    //   Report Count (1)                  64
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              66
# 0x46, 0x86, 0x02,              //   Physical Maximum (646)            68
# 0x26, 0x79, 0x03,              //   Logical Maximum (889)             71
# 0x09, 0x31,                    //   Usage (Y)                         74
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              76
# 0xc0,                          //  End Collection                     78
# 0x05, 0x0d,                    //  Usage Page (Digitizers)            79
# 0x09, 0x22,                    //  Usage (Finger)                     81
# 0xa1, 0x02,                    //  Collection (Logical)               83
# 0x15, 0x00,                    //   Logical Minimum (0)               85
# 0x25, 0x01,                    //   Logical Maximum (1)               87
# 0x09, 0x47,                    //   Usage (Confidence)                89
# 0x09, 0x42,                    //   Usage (Tip Switch)                91
# 0x95, 0x02,                    //   Report Count (2)                  93
# 0x75, 0x01,                    //   Report Size (1)                   95
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              97
# 0x95, 0x01,                    //   Report Count (1)                  99
# 0x75, 0x03,                    //   Report Size (3)                   101
# 0x25, 0x04,                    //   Logical Maximum (4)               103
# 0x09, 0x51,                    //   Usage (Contact Id)                105
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              107
# 0x75, 0x01,                    //   Report Size (1)                   109
# 0x95, 0x03,                    //   Report Count (3)                  111
# 0x81, 0x03,                    //   Input (Cnst,Var,Abs)              113
# 0x05, 0x01,                    //   Usage Page (Generic Desktop)      115
# 0x15, 0x00,                    //   Logical Minimum (0)               117
# 0x26, 0x4d, 0x05,              //   Logical Maximum (1357)            119
# 0x75, 0x10,                    //   Report Size (16)                  122
# 0x55, 0x0e,                    //   Unit Exponent (-2)                124
# 0x65, 0x11,                    //   Unit (Centimeter,SILinear)        126
# 0x09, 0x30,                    //   Usage (X)                         128
# 0x35, 0x00,                    //   Physical Minimum (0)              130
# 0x46, 0xda, 0x03,              //   Physical Maximum (986)            132
# 0x95, 0x01,                    //   Report Count (1)                  135
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              137
# 0x46, 0x86, 0x02,              //   Physical Maximum (646)            139
# 0x26, 0x79, 0x03,              //   Logical Maximum (889)             142
# 0x09, 0x31,                    //   Usage (Y)                         145
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              147
# 0xc0,                          //  End Collection                     149
# 0x05, 0x0d,                    //  Usage Page (Digitizers)            150
# 0x09, 0x22,                    //  Usage (Finger)                     152
# 0xa1, 0x02,                    //  Collection (Logical)               154
# 0x15, 0x00,                    //   Logical Minimum (0)               156
# 0x25, 0x01,                    //   Logical Maximum (1)               158
# 0x09, 0x47,                    //   Usage (Confidence)                160
# 0x09, 0x42,                    //   Usage (Tip Switch)                162
# 0x95, 0x02,                    //   Report Count (2)                  164
# 0x75, 0x01,                    //   Report Size (1)                   166
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              168
# 0x95, 0x01,                    //   Report Count (1)                  170
# 0x75, 0x03,                    //   Report Size (3)                   172
# 0x25, 0x04,                    //   Logical Maximum (4)               174
# 0x09, 0x51,                    //   Usage (Contact Id)                176
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              178
# 0x75, 0x01,                    //   Report Size (1)                   180
# 0x95, 0x03,                    //   Report Count (3)                  182
# 0x81, 0x03,                    //   Input (Cnst,Var,Abs)              184
# 0x05, 0x01,                    //   Usage Page (Generic Desktop)      186
# 0x15, 0x00,                    //   Logical Minimum (0)               188
# 0x26, 0x4d, 0x05,              //   Logical Maximum (1357)            190
# 0x75, 0x10,                    //   Report Size (16)                  193
# 0x55, 0x0e,                    //   Unit Exponent (-2)                195
# 0x65, 0x11,                    //   Unit (Centimeter,SILinear)        197
# 0x09, 0x30,                    //   Usage (X)                         199
# 0x35, 0x00,                    //   Physical Minimum (0)              201
# 0x46, 0xda, 0x03,              //   Physical Maximum (986)            203
# 0x95, 0x01,                    //   Report Count (1)                  206
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              208
# 0x46, 0x86, 0x02,              //   Physical Maximum (646)            210
# 0x26, 0x79, 0x03,              //   Logical Maximum (889)             213
# 0x09, 0x31,                    //   Usage (Y)                         216
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              218
# 0xc0,                          //  End Collection                     220
# 0x05, 0x0d,                    //  Usage Page (Digitizers)            221
# 0x09, 0x22,                    //  Usage (Finger)                     223
# 0xa1, 0x02,                    //  Collection (Logical)               225
# 0x15, 0x00,                    //   Logical Minimum (0)               227
# 0x25, 0x01,                    //   Logical Maximum (1)               229
# 0x09, 0x47,                    //   Usage (Confidence)                231
# 0x09, 0x42,                    //   Usage (Tip Switch)                233
# 0x95, 0x02,                    //   Report Count (2)                  235
# 0x75, 0x01,                    //   Report Size (1)                   237
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              239
# 0x95, 0x01,                    //   Report Count (1)                  241
# 0x75, 0x03,                    //   Report Size (3)                   243
# 0x25, 0x04,                    //   Logical Maximum (4)               245
# 0x09, 0x51,                    //   Usage (Contact Id)                247
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              249
# 0x75, 0x01,                    //   Report Size (1)                   251
# 0x95, 0x03,                    //   Report Count (3)                  253
# 0x81, 0x03,                    //   Input (Cnst,Var,Abs)              255
# 0x05, 0x01,                    //   Usage Page (Generic Desktop)      257
# 0x15, 0x00,                    //   Logical Minimum (0)               259
# 0x26, 0x4d, 0x05,              //   Logical Maximum (1357)            261
# 0x75, 0x10,                    //   Report Size (16)                  264
# 0x55, 0x0e,                    //   Unit Exponent (-2)                266
# 0x65, 0x11,                    //   Unit (Centimeter,SILinear)        268
# 0x09, 0x30,                    //   Usage (X)                         270
# 0x35, 0x00,                    //   Physical Minimum (0)              272
# 0x46, 0xda, 0x03,              //   Physical Maximum (986)            274
# 0x95, 0x01,                    //   Report Count (1)                  277
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              279
# 0x46, 0x86, 0x02,              //   Physical Maximum (646)            281
# 0x26, 0x79, 0x03,              //   Logical Maximum (889)             284
# 0x09, 0x31,                    //   Usage (Y)                         287
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              289
# 0xc0,                          //  End Collection                     291
# 0x05, 0x0d,                    //  Usage Page (Digitizers)            292
# 0x09, 0x22,                    //  Usage (Finger)                     294
# 0xa1, 0x02,                    //  Collection (Logical)               296
# 0x15, 0x00,                    //   Logical Minimum (0)               298
# 0x25, 0x01,                    //   Logical Maximum (1)               300
# 0x09, 0x47,                    //   Usage (Confidence)                302
# 0x09, 0x42,                    //   Usage (Tip Switch)                304
# 0x95, 0x02,                    //   Report Count (2)                  306
# 0x75, 0x01,                    //   Report Size (1)                   308
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              310
# 0x95, 0x01,                    //   Report Count (1)                  312
# 0x75, 0x03,                    //   Report Size (3)                   314
# 0x25, 0x04,                    //   Logical Maximum (4)               316
# 0x09, 0x51,                    //   Usage (Contact Id)                318
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              320
# 0x75, 0x01,                    //   Report Size (1)                   322
# 0x95, 0x03,                    //   Report Count (3)                  324
# 0x81, 0x03,                    //   Input (Cnst,Var,Abs)              326
# 0x05, 0x01,                    //   Usage Page (Generic Desktop)      328
# 0x15, 0x00,                    //   Logical Minimum (0)               330
# 0x26, 0x4d, 0x05,              //   Logical Maximum (1357)            332
# 0x75, 0x10,                    //   Report Size (16)                  335
# 0x55, 0x0e,                    //   Unit Exponent (-2)                337
# 0x65, 0x11,                    //   Unit (Centimeter,SILinear)        339
# 0x09, 0x30,                    //   Usage (X)                         341
# 0x35, 0x00,                    //   Physical Minimum (0)              343
# 0x46, 0xda, 0x03,              //   Physical Maximum (986)            345
# 0x95, 0x01,                    //   Report Count (1)                  348
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              350
# 0x46, 0x86, 0x02,              //   Physical Maximum (646)            352
# 0x26, 0x79, 0x03,              //   Logical Maximum (889)             355
# 0x09, 0x31,                    //   Usage (Y)                         358
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              360
# 0xc0,                          //  End Collection                     362
# 0x05, 0x0d,                    //  Usage Page (Digitizers)            363
# 0x09, 0x56,                    //  Usage (Scan Time)                  365
# 0x55, 0x0c,                    //  Unit Exponent (-4)                 367
# 0x66, 0x01, 0x10,              //  Unit (Seconds,SILinear)            369
# 0x35, 0x00,                    //  Physical Minimum (0)               372
# 0x47, 0xff, 0xff, 0x00, 0x00,  //  Physical Maximum (65535)           374
# 0x15, 0x00,                    //  Logical Minimum (0)                379
# 0x27, 0xff, 0xff, 0x00, 0x00,  //  Logical Maximum (65535)            381
# 0x75, 0x10,                    //  Report Size (16)                   386
# 0x95, 0x01,                    //  Report Count (1)                   388
# 0x81, 0x02,                    //  Input (Data,Var,Abs)               390
# 0x05, 0x0d,                    //  Usage Page (Digitizers)            392
# 0x09, 0x54,                    //  Usage (Contact Count)              394
# 0x15, 0x00,                    //  Logical Minimum (0)                396
# 0x25, 0x05,                    //  Logical Maximum (5)                398
# 0x75, 0x08,                    //  Report Size (8)                    400
# 0x95, 0x01,                    //  Report Count (1)                   402
# 0x81, 0x02,                    //  Input (Data,Var,Abs)               404
# 0x05, 0x09,                    //  Usage Page (Button)                406
# 0x09, 0x01,                    //  Usage (Vendor Usage 0x01)          408
# 0x15, 0x00,                    //  Logical Minimum (0)                410
# 0x25, 0x01,                    //  Logical Maximum (1)                412
# 0x75, 0x01,                    //  Report Size (1)                    414
# 0x95, 0x01,                    //  Report Count (1)                   416
# 0x81, 0x02,                    //  Input (Data,Var,Abs)               418
# 0x95, 0x07,                    //  Report Count (7)                   420
# 0x81, 0x03,                    //  Input (Cnst,Var,Abs)               422
# 0x06, 0x0d, 0x00,              //  Usage Page (Digitizers)            424
# 0x09, 0x55,                    //  Usage (Contact Max)                427
# 0x15, 0x00,                    //  Logical Minimum (0)                429
# 0x26, 0x05, 0x00,              //  Logical Maximum (5)                431
# 0x75, 0x08,                    //  Report Size (8)                    434
# 0x96, 0x01, 0x00,              //  Report Count (1)                   436
# 0x85, 0x03,                    //  Report ID (3)                      439
# 0xb1, 0x02,                    //  Feature (Data,Var,Abs)             441
# 0x06, 0x0d, 0x00,              //  Usage Page (Digitizers)            443
# 0x09, 0x59,                    //  Usage (Button Type)                446
# 0x15, 0x00,                    //  Logical Minimum (0)                448
# 0x26, 0x01, 0x00,              //  Logical Maximum (1)                450
# 0x75, 0x08,                    //  Report Size (8)                    453
# 0x96, 0x01, 0x00,              //  Report Count (1)                   455
# 0x85, 0x04,                    //  Report ID (4)                      458
# 0xb1, 0x02,                    //  Feature (Data,Var,Abs)             460
# 0x06, 0x00, 0xff,              //  Usage Page (Vendor Defined Page 1) 462
# 0x85, 0x05,                    //  Report ID (5)                      465
# 0x75, 0x08,                    //  Report Size (8)                    467
# 0x15, 0x00,                    //  Logical Minimum (0)                469
# 0x09, 0xc6,                    //  Usage (Vendor Usage 0xc6)          471
# 0x25, 0x08,                    //  Logical Maximum (8)                473
# 0x95, 0x01,                    //  Report Count (1)                   475
# 0xb1, 0x02,                    //  Feature (Data,Var,Abs)             477
# 0x09, 0xc7,                    //  Usage (Vendor Usage 0xc7)          479
# 0x26, 0xff, 0x00,              //  Logical Maximum (255)              481
# 0x95, 0x20,                    //  Report Count (32)                  484
# 0xb1, 0x02,                    //  Feature (Data,Var,Abs)             486
# 0x85, 0x09,                    //  Report ID (9)                      488
# 0x06, 0x00, 0xff,              //  Usage Page (Vendor Defined Page 1) 490
# 0x09, 0xc5,                    //  Usage (Vendor Usage 0xc5)          493
# 0x15, 0x00,                    //  Logical Minimum (0)                495
# 0x26, 0xff, 0x00,              //  Logical Maximum (255)              497
# 0x75, 0x08,                    //  Report Size (8)                    500
# 0x96, 0x00, 0x01,              //  Report Count (256)                 502
# 0xb1, 0x02,                    //  Feature (Data,Var,Abs)             505
# 0xc0,                          // End Collection                      507
# 0x05, 0x0d,                    // Usage Page (Digitizers)             508
# 0x09, 0x0e,                    // Usage (Device Configuration)        510
# 0xa1, 0x01,                    // Collection (Application)            512
# 0x05, 0x0d,                    //  Usage Page (Digitizers)            514
# 0x09, 0x22,                    //  Usage (Finger)                     516
# 0xa1, 0x02,                    //  Collection (Logical)               518
# 0x09, 0x52,                    //   Usage (Inputmode)                 520
# 0x15, 0x00,                    //   Logical Minimum (0)               522
# 0x25, 0x0a,                    //   Logical Maximum (10)              524
# 0x75, 0x08,                    //   Report Size (8)                   526
# 0x95, 0x01,                    //   Report Count (1)                  528
# 0x85, 0x06,                    //   Report ID (6)                     530
# 0xb1, 0x02,                    //   Feature (Data,Var,Abs)            532
# 0xc0,                          //  End Collection                     534
# 0x05, 0x0d,                    //  Usage Page (Digitizers)            535
# 0x09, 0x22,                    //  Usage (Finger)                     537
# 0xa1, 0x00,                    //  Collection (Physical)              539
# 0x09, 0x57,                    //   Usage (Surface Switch)            541
# 0x09, 0x58,                    //   Usage (Button Switch)             543
# 0x15, 0x00,                    //   Logical Minimum (0)               545
# 0x25, 0x01,                    //   Logical Maximum (1)               547
# 0x75, 0x01,                    //   Report Size (1)                   549
# 0x95, 0x02,                    //   Report Count (2)                  551
# 0x85, 0x07,                    //   Report ID (7)                     553
# 0xb1, 0x02,                    //   Feature (Data,Var,Abs)            555
# 0x95, 0x06,                    //   Report Count (6)                  557
# 0xb1, 0x03,                    //   Feature (Cnst,Var,Abs)            559
# 0xc0,                          //  End Collection                     561
# 0x05, 0x0d,                    //  Usage Page (Digitizers)            562
# 0x09, 0x60,                    //  Usage (Vendor Usage 0x60)          564
# 0x15, 0x00,                    //  Logical Minimum (0)                566
# 0x25, 0x01,                    //  Logical Maximum (1)                568
# 0x75, 0x01,                    //  Report Size (1)                    570
# 0x95, 0x01,                    //  Report Count (1)                   572
# 0x85, 0x08,                    //  Report ID (8)                      574
# 0xb1, 0x02,                    //  Feature (Data,Var,Abs)             576
# 0x95, 0x07,                    //  Report Count (7)                   578
# 0xb1, 0x03,                    //  Feature (Cnst,Var,Abs)             580
# 0xc0,                          // End Collection                      582
# 0x05, 0x01,                    // Usage Page (Generic Desktop)        583
# 0x09, 0x02,                    // Usage (Mouse)                       585
# 0xa1, 0x01,                    // Collection (Application)            587
# 0x85, 0x02,                    //  Report ID (2)                      589
# 0x05, 0x01,                    //  Usage Page (Generic Desktop)       591
# 0x09, 0x01,                    //  Usage (Pointer)                    593
# 0xa1, 0x00,                    //  Collection (Physical)              595
# 0x05, 0x09,                    //   Usage Page (Button)               597
# 0x19, 0x01,                    //   Usage Minimum (1)                 599
# 0x29, 0x02,                    //   Usage Maximum (2)                 601
# 0x15, 0x00,                    //   Logical Minimum (0)               603
# 0x25, 0x01,                    //   Logical Maximum (1)               605
# 0x75, 0x01,                    //   Report Size (1)                   607
# 0x95, 0x02,                    //   Report Count (2)                  609
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              611
# 0x05, 0x0d,                    //   Usage Page (Digitizers)           613
# 0x09, 0x32,                    //   Usage (In Range)                  615
# 0x75, 0x01,                    //   Report Size (1)                   617
# 0x95, 0x01,                    //   Report Count (1)                  619
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              621
# 0x75, 0x05,                    //   Report Size (5)                   623
# 0x95, 0x01,                    //   Report Count (1)                  625
# 0x81, 0x03,                    //   Input (Cnst,Var,Abs)              627
# 0x05, 0x01,                    //   Usage Page (Generic Desktop)      629
# 0x75, 0x10,                    //   Report Size (16)                  631
# 0x95, 0x01,                    //   Report Count (1)                  633
# 0x35, 0x00,                    //   Physical Minimum (0)              635
# 0x45, 0x00,                    //   Physical Maximum (0)              637
# 0x16, 0x00, 0x80,              //   Logical Minimum (-32768)          639
# 0x26, 0xff, 0x7f,              //   Logical Maximum (32767)           642
# 0x09, 0x30,                    //   Usage (X)                         645
# 0x81, 0x26,                    //   Input (Data,Var,Rel,NoPref)       647
# 0x16, 0x00, 0x80,              //   Logical Minimum (-32768)          649
# 0x26, 0xff, 0x7f,              //   Logical Maximum (32767)           652
# 0x09, 0x31,                    //   Usage (Y)                         655
# 0x81, 0x26,                    //   Input (Data,Var,Rel,NoPref)       657
# 0xc0,                          //  End Collection                     659
# 0xc0,                          // End Collection                      660
# 0x06, 0x00, 0xff,              // Usage Page (Vendor Defined Page 1)  661
# 0x09, 0x01,                    // Usage (Vendor Usage 1)              664
# 0xa1, 0x01,                    // Collection (Application)            666
# 0x85, 0x42,                    //  Report ID (66)                     668
# 0x09, 0x06,                    //  Usage (Vendor Usage 0x06)          670
# 0x15, 0x00,                    //  Logical Minimum (0)                672
# 0x26, 0xff, 0x00,              //  Logical Maximum (255)              674
# 0x75, 0x08,                    //  Report Size (8)                    677
# 0x95, 0x03,                    //  Report Count (3)                   679
# 0xb1, 0x02,                    //  Feature (Data,Var,Abs)             681
# 0xc0,                          // End Collection                      683
# 
R: 684 05 0d 09 05 a1 01 85 01 05 0d 09 22 a1 02 15 00 25 01 09 47 09 42 95 02 75 01 81 02 95 01 75 03 25 04 09 51 81 02 75 01 95 03 81 03 05 01 15 00 26 4d 05 75 10 55 0e 65 11 09 30 35 00 46 da 03 95 01 81 02 46 86 02 26 79 03 09 31 81 02 c0 05 0d 09 22 a1 02 15 00 25 01 09 47 09 42 95 02 75 01 81 02 95 01 75 03 25 04 09 51 81 02 75 01 95 03 81 03 05 01 15 00 26 4d 05 75 10 55 0e 65 11 09 30 35 00 46 da 03 95 01 81 02 46 86 02 26 79 03 09 31 81 02 c0 05 0d 09 22 a1 02 15 00 25 01 09 47 09 42 95 02 75 01 81 02 95 01 75 03 25 04 09 51 81 02 75 01 95 03 81 03 05 01 15 00 26 4d 05 75 10 55 0e 65 11 09 30 35 00 46 da 03 95 01 81 02 46 86 02 26 79 03 09 31 81 02 c0 05 0d 09 22 a1 02 15 00 25 01 09 47 09 42 95 02 75 01 81 02 95 01 75 03 25 04 09 51 81 02 75 01 95 03 81 03 05 01 15 00 26 4d 05 75 10 55 0e 65 11 09 30 35 00 46 da 03 95 01 81 02 46 86 02 26 79 03 09 31 81 02 c0 05 0d 09 22 a1 02 15 00 25 01 09 47 09 42 95 02 75 01 81 02 95 01 75 03 25 04 09 51 81 02 75 01 95 03 81 03 05 01 15 00 26 4d 05 75 10 55 0e 65 11 09 30 35 00 46 da 03 95 01 81 02 46 86 02 26 79 03 09 31 81 02 c0 05 0d 09 56 55 0c 66 01 10 35 00 47 ff ff 00 00 15 00 27 ff ff 00 00 75 10 95 01 81 02 05 0d 09 54 15 00 25 05 75 08 95 01 81 02 05 09 09 01 15 00 25 01 75 01 95 01 81 02 95 07 81 03 06 0d 00 09 55 15 00 26 05 00 75 08 96 01 00 85 03 b1 02 06 0d 00 09 59 15 00 26 01 00 75 08 96 01 00 85 04 b1 02 06 00 ff 85 05 75 08 15 00 09 c6 25 08 95 01 b1 02 09 c7 26 ff 00 95 20 b1 02 85 09 06 00 ff 09 c5 15 00 26 ff 00 75 08 96 00 01 b1 02 c0 05 0d 09 0e a1 01 05 0d 09 22 a1 02 09 52 15 00 25 0a 75 08 95 01 85 06 b1 02 c0 05 0d 09 22 a1 00 09 57 09 58 15 00 25 01 75 01 95 02 85 07 b1 02 95 06 b1 03 c0 05 0d 09 60 15 00 25 01 75 01 95 01 85 08 b1 02 95 07 b1 03 c0 05 01 09 02 a1 01 85 02 05 01 09 01 a1 00 05 09 19 01 29 02 15 00 25 01 75 01 95 02 81 02 05 0d 09 32 75 01 95 01 81 02 75 05 95 01 81 03 05 01 75 10 95 01 35 00 45 00 16 00 80 26 ff 7f 09 30 81 26 16 00 80 26 ff 7f 09 31 81 26 c0 c0 06 00 ff 09 01 a1 01 85 42 09 06 15 00 26 ff 00 75 08 95 03 b1 02 c0
N: 04CA00A0:00 04CA:00A0
I: 18 04ca 00a0

# MELF0411:00 1FD2:7012
# 0x05, 0x0d,                    // Usage Page (Digitizers)             0
# 0x09, 0x04,                    // Usage (Touch Screen)                2
# 0xa1, 0x01,                    // Collection (Application)            4
# 0x85, 0x10,                    //  Report ID (16)                     6
# 0x09, 0x54,                    //  Usage (Contact Count)              8
# 0x75, 0x08,                    //  Report Size (8)                    10
# 0x95, 0x01,                    //  Report Count (1)                   12
# 0x15, 0x00,                    //  Logical Minimum (0)                14
# 0x25, 0x0a,                    //  Logical Maximum (10)               16
# 0x81, 0x02,                    //  Input (Data,Var,Abs)               18
# 0x09, 0x22,                    //  Usage (Finger)                     20
# 0xa1, 0x02,                    //  Collection (Logical)               22
# 0x09, 0x51,                    //   Usage (Contact Id)                24
# 0x75, 0x08,                    //   Report Size (8)                   26
# 0x25, 0x0a,                    //   Logical Maximum (10)              28
# 0x81, 0x03,                    //   Input (Cnst,Var,Abs)              30
# 0x09, 0x42,                    //   Usage (Tip Switch)                32
# 0x75, 0x01,                    //   Report Size (1)                   34
# 0x25, 0x01,                    //   Logical Maximum (1)               36
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              38
# 0x95, 0x07,                    //   Report Count (7)                  40
# 0x81, 0x03,                    //   Input (Cnst,Var,Abs)              42
# 0x05, 0x01,                    //   Usage Page (Generic Desktop)      44
# 0x75, 0x10,                    //   Report Size (16)                  46
# 0x95, 0x01,                    //   Report Count (1)                  48
# 0x26, 0xff, 0x0f,              //   Logical Maximum (4095)            50
# 0x35, 0x00,                    //   Physical Minimum (0)              53
# 0x55, 0x0e,                    //   Unit Exponent (-2)                55
# 0x65, 0x11,                    //   Unit (Centimeter,SILinear)        57
# 0x09, 0x30,                    //   Usage (X)                         59
# 0x46, 0x71, 0x0d,              //   Physical Maximum (3441)           61
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              64
# 0x09, 0x31,                    //   Usage (Y)                         66
# 0x46, 0x90, 0x07,              //   Physical Maximum (1936)           68
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              71
# 0x45, 0x00,                    //   Physical Maximum (0)              73
# 0xc0,                          //  End Collection                     75
# 0x05, 0x0d,                    //  Usage Page (Digitizers)            76
# 0x09, 0x22,                    //  Usage (Finger)                     78
# 0xa1, 0x02,                    //  Collection (Logical)               80
# 0x09, 0x51,                    //   Usage (Contact Id)                82
# 0x75, 0x08,                    //   Report Size (8)                   84
# 0x25, 0x0a,                    //   Logical Maximum (10)              86
# 0x81, 0x03,                    //   Input (Cnst,Var,Abs)              88
# 0x09, 0x42,                    //   Usage (Tip Switch)                90
# 0x75, 0x01,                    //   Report Size (1)                   92
# 0x25, 0x01,                    //   Logical Maximum (1)               94
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              96
# 0x95, 0x07,                    //   Report Count (7)                  98
# 0x81, 0x03,                    //   Input (Cnst,Var,Abs)              100
# 0x05, 0x01,                    //   Usage Page (Generic Desktop)      102
# 0x75, 0x10,                    //   Report Size (16)                  104
# 0x95, 0x01,                    //   Report Count (1)                  106
# 0x26, 0xff, 0x0f,              //   Logical Maximum (4095)            108
# 0x35, 0x00,                    //   Physical Minimum (0)              111
# 0x55, 0x0e,                    //   Unit Exponent (-2)                113
# 0x65, 0x11,                    //   Unit (Centimeter,SILinear)        115
# 0x09, 0x30,                    //   Usage (X)                         117
# 0x46, 0x71, 0x0d,              //   Physical Maximum (3441)           119
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              122
# 0x09, 0x31,                    //   Usage (Y)                         124
# 0x46, 0x90, 0x07,              //   Physical Maximum (1936)           126
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              129
# 0x45, 0x00,                    //   Physical Maximum (0)              131
# 0xc0,                          //  End Collection                     133
# 0x05, 0x0d,                    //  Usage Page (Digitizers)            134
# 0x09, 0x22,                    //  Usage (Finger)                     136
# 0xa1, 0x02,                    //  Collection (Logical)               138
# 0x09, 0x51,                    //   Usage (Contact Id)                140
# 0x75, 0x08,                    //   Report Size (8)                   142
# 0x25, 0x0a,                    //   Logical Maximum (10)              144
# 0x81, 0x03,                    //   Input (Cnst,Var,Abs)              146
# 0x09, 0x42,                    //   Usage (Tip Switch)                148
# 0x75, 0x01,                    //   Report Size (1)                   150
# 0x25, 0x01,                    //   Logical Maximum (1)               152
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              154
# 0x95, 0x07,                    //   Report Count (7)                  156
# 0x81, 0x03,                    //   Input (Cnst,Var,Abs)              158
# 0x05, 0x01,                    //   Usage Page (Generic Desktop)      160
# 0x75, 0x10,                    //   Report Size (16)                  162
# 0x95, 0x01,                    //   Report Count (1)                  164
# 0x26, 0xff, 0x0f,              //   Logical Maximum (4095)            166
# 0x35, 0x00,                    //   Physical Minimum (0)              169
# 0x55, 0x0e,                    //   Unit Exponent (-2)                171
# 0x65, 0x11,                    //   Unit (Centimeter,SILinear)        173
# 0x09, 0x30,                    //   Usage (X)                         175
# 0x46, 0x71, 0x0d,              //   Physical Maximum (3441)           177
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              180
# 0x09, 0x31,                    //   Usage (Y)                         182
# 0x46, 0x90, 0x07,              //   Physical Maximum (1936)           184
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              187
# 0x45, 0x00,                    //   Physical Maximum (0)              189
# 0xc0,                          //  End Collection                     191
# 0x05, 0x0d,                    //  Usage Page (Digitizers)            192
# 0x09, 0x22,                    //  Usage (Finger)                     194
# 0xa1, 0x02,                    //  Collection (Logical)               196
# 0x09, 0x51,                    //   Usage (Contact Id)                198
# 0x75, 0x08,                    //   Report Size (8)                   200
# 0x25, 0x0a,                    //   Logical Maximum (10)              202
# 0x81, 0x03,                    //   Input (Cnst,Var,Abs)              204
# 0x09, 0x42,                    //   Usage (Tip Switch)                206
# 0x75, 0x01,                    //   Report Size (1)                   208
# 0x25, 0x01,                    //   Logical Maximum (1)               210
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              212
# 0x95, 0x07,                    //   Report Count (7)                  214
# 0x81, 0x03,                    //   Input (Cnst,Var,Abs)              216
# 0x05, 0x01,                    //   Usage Page (Generic Desktop)      218
# 0x75, 0x10,                    //   Report Size (16)                  220
# 0x95, 0x01,                    //   Report Count (1)                  222
# 0x26, 0xff, 0x0f,              //   Logical Maximum (4095)            224
# 0x35, 0x00,                    //   Physical Minimum (0)              227
# 0x55, 0x0e,                    //   Unit Exponent (-2)                229
# 0x65, 0x11,                    //   Unit (Centimeter,SILinear)        231
# 0x09, 0x30,                    //   Usage (X)                         233
# 0x46, 0x71, 0x0d,              //   Physical Maximum (3441)           235
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              238
# 0x09, 0x31,                    //   Usage (Y)                         240
# 0x46, 0x90, 0x07,              //   Physical Maximum (1936)           242
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              245
# 0x45, 0x00,                    //   Physical Maximum (0)              247
# 0xc0,                          //  End Collection                     249
# 0x05, 0x0d,                    //  Usage Page (Digitizers)            250
# 0x09, 0x22,                    //  Usage (Finger)                     252
# 0xa1, 0x02,                    //  Collection (Logical)               254
# 0x09, 0x51,                    //   Usage (Contact Id)                256
# 0x75, 0x08,                    //   Report Size (8)                   258
# 0x25, 0x0a,                    //   Logical Maximum (10)              260
# 0x81, 0x03,                    //   Input (Cnst,Var,Abs)              262
# 0x09, 0x42,                    //   Usage (Tip Switch)                264
# 0x75, 0x01,                    //   Report Size (1)                   266
# 0x25, 0x01,                    //   Logical Maximum (1)               268
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              270
# 0x95, 0x07,                    //   Report Count (7)                  272
# 0x81, 0x03,                    //   Input (Cnst,Var,Abs)              274
# 0x05, 0x01,                    //   Usage Page (Generic Desktop)      276
# 0x75, 0x10,                    //   Report Size (16)                  278
# 0x95, 0x01,                    //   Report Count (1)                  280
# 0x26, 0xff, 0x0f,              //   Logical Maximum (4095)            282
# 0x35, 0x00,                    //   Physical Minimum (0)              285
# 0x55, 0x0e,                    //   Unit Exponent (-2)                287
# 0x65, 0x11,                    //   Unit (Centimeter,SILinear)        289
# 0x09, 0x30,                    //   Usage (X)                         291
# 0x46, 0x71, 0x0d,              //   Physical Maximum (3441)           293
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              296
# 0x09, 0x31,                    //   Usage (Y)                         298
# 0x46, 0x90, 0x07,              //   Physical Maximum (1936)           300
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              303
# 0x45, 0x00,                    //   Physical Maximum (0)              305
# 0xc0,                          //  End Collection                     307
# 0x05, 0x0d,                    //  Usage Page (Digitizers)            308
# 0x09, 0x22,                    //  Usage (Finger)                     310
# 0xa1, 0x02,                    //  Collection (Logical)               312
# 0x09, 0x51,                    //   Usage (Contact Id)                314
# 0x75, 0x08,                    //   Report Size (8)                   316
# 0x25, 0x0a,                    //   Logical Maximum (10)              318
# 0x81, 0x03,                    //   Input (Cnst,Var,Abs)              320
# 0x09, 0x42,                    //   Usage (Tip Switch)                322
# 0x75, 0x01,                    //   Report Size (1)                   324
# 0x25, 0x01,                    //   Logical Maximum (1)               326
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              328
# 0x95, 0x07,                    //   Report Count (7)                  330
# 0x81, 0x03,                    //   Input (Cnst,Var,Abs)              332
# 0x05, 0x01,                    //   Usage Page (Generic Desktop)      334
# 0x75, 0x10,                    //   Report Size (16)                  336
# 0x95, 0x01,                    //   Report Count (1)                  338
# 0x26, 0xff, 0x0f,              //   Logical Maximum (4095)            340
# 0x35, 0x00,                    //   Physical Minimum (0)              343
# 0x55, 0x0e,                    //   Unit Exponent (-2)                345
# 0x65, 0x11,                    //   Unit (Centimeter,SILinear)        347
# 0x09, 0x30,                    //   Usage (X)                         349
# 0x46, 0x71, 0x0d,              //   Physical Maximum (3441)           351
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              354
# 0x09, 0x31,                    //   Usage (Y)                         356
# 0x46, 0x90, 0x07,              //   Physical Maximum (1936)           358
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              361
# 0x45, 0x00,                    //   Physical Maximum (0)              363
# 0xc0,                          //  End Collection                     365
# 0x05, 0x0d,                    //  Usage Page (Digitizers)            366
# 0x09, 0x22,                    //  Usage (Finger)                     368
# 0xa1, 0x02,                    //  Collection (Logical)               370
# 0x09, 0x51,                    //   Usage (Contact Id)                372
# 0x75, 0x08,                    //   Report Size (8)                   374
# 0x25, 0x0a,                    //   Logical Maximum (10)              376
# 0x81, 0x03,                    //   Input (Cnst,Var,Abs)              378
# 0x09, 0x42,                    //   Usage (Tip Switch)                380
# 0x75, 0x01,                    //   Report Size (1)                   382
# 0x25, 0x01,                    //   Logical Maximum (1)               384
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              386
# 0x95, 0x07,                    //   Report Count (7)                  388
# 0x81, 0x03,                    //   Input (Cnst,Var,Abs)              390
# 0x05, 0x01,                    //   Usage Page (Generic Desktop)      392
# 0x75, 0x10,                    //   Report Size (16)                  394
# 0x95, 0x01,                    //   Report Count (1)                  396
# 0x26, 0xff, 0x0f,              //   Logical Maximum (4095)            398
# 0x35, 0x00,                    //   Physical Minimum (0)              401
# 0x55, 0x0e,                    //   Unit Exponent (-2)                403
# 0x65, 0x11,                    //   Unit (Centimeter,SILinear)        405
# 0x09, 0x30,                    //   Usage (X)                         407
# 0x46, 0x71, 0x0d,              //   Physical Maximum (3441)           409
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              412
# 0x09, 0x31,                    //   Usage (Y)                         414
# 0x46, 0x90, 0x07,              //   Physical Maximum (1936)           416
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              419
# 0x45, 0x00,                    //   Physical Maximum (0)              421
# 0xc0,                          //  End Collection                     423
# 0x05, 0x0d,                    //  Usage Page (Digitizers)            424
# 0x09, 0x22,                    //  Usage (Finger)                     426
# 0xa1, 0x02,                    //  Collection (Logical)               428
# 0x09, 0x51,                    //   Usage (Contact Id)                430
# 0x75, 0x08,                    //   Report Size (8)                   432
# 0x25, 0x0a,                    //   Logical Maximum (10)              434
# 0x81, 0x03,                    //   Input (Cnst,Var,Abs)              436
# 0x09, 0x42,                    //   Usage (Tip Switch)                438
# 0x75, 0x01,                    //   Report Size (1)                   440
# 0x25, 0x01,                    //   Logical Maximum (1)               442
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              444
# 0x95, 0x07,                    //   Report Count (7)                  446
# 0x81, 0x03,                    //   Input (Cnst,Var,Abs)              448
# 0x05, 0x01,                    //   Usage Page (Generic Desktop)      450
# 0x75, 0x10,                    //   Report Size (16)                  452
# 0x95, 0x01,                    //   Report Count (1)                  454
# 0x26, 0xff, 0x0f,              //   Logical Maximum (4095)            456
# 0x35, 0x00,                    //   Physical Minimum (0)              459
# 0x55, 0x0e,                    //   Unit Exponent (-2)                461
# 0x65, 0x11,                    //   Unit (Centimeter,SILinear)        463
# 0x09, 0x30,                    //   Usage (X)                         465
# 0x46, 0x71, 0x0d,              //   Physical Maximum (3441)           467
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              470
# 0x09, 0x31,                    //   Usage (Y)                         472
# 0x46, 0x90, 0x07,              //   Physical Maximum (1936)           474
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              477
# 0x45, 0x00,                    //   Physical Maximum (0)              479
# 0xc0,                          //  End Collection                     481
# 0x05, 0x0d,                    //  Usage Page (Digitizers)            482
# 0x09, 0x22,                    //  Usage (Finger)                     484
# 0xa1, 0x02,                    //  Collection (Logical)               486
# 0x09, 0x51,                    //   Usage (Contact Id)                488
# 0x75, 0x08,                    //   Report Size (8)                   490
# 0x25, 0x0a,                    //   Logical Maximum (10)              492
# 0x81, 0x03,                    //   Input (Cnst,Var,Abs)              494
# 0x09, 0x42,                    //   Usage (Tip Switch)                496
# 0x75, 0x01,                    //   Report Size (1)                   498
# 0x25, 0x01,                    //   Logical Maximum (1)               500
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              502
# 0x95, 0x07,                    //   Report Count (7)                  504
# 0x81, 0x03,                    //   Input (Cnst,Var,Abs)              506
# 0x05, 0x01,                    //   Usage Page (Generic Desktop)      508
# 0x75, 0x10,                    //   Report Size (16)                  510
# 0x95, 0x01,                    //   Report Count (1)                  512
# 0x26, 0xff, 0x0f,              //   Logical Maximum (4095)            514
# 0x35, 0x00,                    //   Physical Minimum (0)              517
# 0x55, 0x0e,                    //   Unit Exponent (-2)                519
# 0x65, 0x11,                    //   Unit (Centimeter,SILinear)        521
# 0x09, 0x30,                    //   Usage (X)                         523
# 0x46, 0x71, 0x0d,              //   Physical Maximum (3441)           525
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              528
# 0x09, 0x31,                    //   Usage (Y)                         530
# 0x46, 0x90, 0x07,              //   Physical Maximum (1936)           532
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              535
# 0x45, 0x00,                    //   Physical Maximum (0)              537
# 0xc0,                          //  End Collection                     539
# 0x05, 0x0d,                    //  Usage Page (Digitizers)            540
# 0x09, 0x22,                    //  Usage (Finger)                     542
# 0xa1, 0x02,                    //  Collection (Logical)               544
# 0x09, 0x51,                    //   Usage (Contact Id)                546
# 0x75, 0x08,                    //   Report Size (8)                   548
# 0x25, 0x0a,                    //   Logical Maximum (10)              550
# 0x81, 0x03,                    //   Input (Cnst,Var,Abs)              552
# 0x09, 0x42,                    //   Usage (Tip Switch)                554
# 0x75, 0x01,                    //   Report Size (1)                   556
# 0x25, 0x01,                    //   Logical Maximum (1)               558
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              560
# 0x95, 0x07,                    //   Report Count (7)                  562
# 0x81, 0x03,                    //   Input (Cnst,Var,Abs)              564
# 0x05, 0x01,                    //   Usage Page (Generic Desktop)      566
# 0x75, 0x10,                    //   Report Size (16)                  568
# 0x95, 0x01,                    //   Report Count (1)                  570
# 0x26, 0xff, 0x0f,              //   Logical Maximum (4095)            572
# 0x35, 0x00,                    //   Physical Minimum (0)              575
# 0x55, 0x0e,                    //   Unit Exponent (-2)                577
# 0x65, 0x11,                    //   Unit (Centimeter,SILinear)        579
# 0x09, 0x30,                    //   Usage (X)                         581
# 0x46, 0x71, 0x0d,              //   Physical Maximum (3441)           583
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              586
# 0x09, 0x31,                    //   Usage (Y)                         588
# 0x46, 0x90, 0x07,              //   Physical Maximum (1936)           590
# 0x81, 0x02,                    //   Input (Data,Var,Abs)              593
# 0x45, 0x00,                    //   Physical Maximum (0)              595
# 0xc0,                          //  End Collection                     597
# 0x05, 0x0d,                    //  Usage Page (Digitizers)            598
# 0x09, 0x56,                    //  Usage (Scan Time)                  600
# 0x75, 0x10,                    //  Report Size (16)                   602
# 0x95, 0x01,                    //  Report Count (1)                   604
# 0x55, 0x0c,                    //  Unit Exponent (-4)                 606
# 0x66, 0x01, 0x10,              //  Unit (Seconds,SILinear)            608
# 0x47, 0xff, 0xff, 0x00, 0x00,  //  Physical Maximum (65535)           611
# 0x27, 0xff, 0xff, 0x00, 0x00,  //  Logical Maximum (65535)            616
# 0x81, 0x02,                    //  Input (Data,Var,Abs)               621
# 0x85, 0x08,                    //  Report ID (8)                      623
# 0x09, 0x55,                    //  Usage (Contact Max)                625
# 0x75, 0x08,                    //  Report Size (8)                    627
# 0x25, 0x0a,                    //  Logical Maximum (10)               629
# 0xb1, 0x02,                    //  Feature (Data,Var,Abs)             631
# 0x85, 0x04,                    //  Report ID (4)                      633
# 0x06, 0x00, 0xff,              //  Usage Page (Vendor Defined Page 1) 635
# 0x09, 0xc5,                    //  Usage (Vendor Usage 0xc5)          638
# 0x96, 0x00, 0x01,              //  Report Count (256)                 640
# 0x26, 0xff, 0x00,              //  Logical Maximum (255)              643
# 0xb1, 0x02,                    //  Feature (Data,Var,Abs)             646
# 0xc0,                          // End Collection                      648
# 0x06, 0x00, 0xff,              // Usage Page (Vendor Defined Page 1)  649
# 0x09, 0xff,                    // Usage (Vendor Usage 0xff)           652
# 0xa1, 0x01,                    // Collection (Application)            654
# 0x85, 0x09,                    //  Report ID (9)                      656
# 0x09, 0xff,                    //  Usage (Vendor Usage 0xff)          658
# 0x75, 0x08,                    //  Report Size (8)                    660
# 0x95, 0x3f,                    //  Report Count (63)                  662
# 0x15, 0x00,                    //  Logical Minimum (0)                664
# 0x26, 0xff, 0x00,              //  Logical Maximum (255)              666
# 0x91, 0x00,                    //  Output (Data,Arr,Abs)              669
# 0x85, 0x0a,                    //  Report ID (10)                     671
# 0x09, 0xff,                    //  Usage (Vendor Usage 0xff)          673
# 0x81, 0x00,                    //  Input (Data,Arr,Abs)               675
# 0xc0,                          // End Collection                      677
# 
R: 678 05 0d 09 04 a1 01 85 10 09 54 75 08 95 01 15 00 25 0a 81 02 09 22 a1 02 09 51 75 08 25 0a 81 03 09 42 75 01 25 01 81 02 95 07 81 03 05 01 75 10 95 01 26 ff 0f 35 00 55 0e 65 11 09 30 46 71 0d 81 02 09 31 46 90 07 81 02 45 00 c0 05 0d 09 22 a1 02 09 51 75 08 25 0a 81 03 09 42 75 01 25 01 81 02 95 07 81 03 05 01 75 10 95 01 26 ff 0f 35 00 55 0e 65 11 09 30 46 71 0d 81 02 09 31 46 90 07 81 02 45 00 c0 05 0d 09 22 a1 02 09 51 75 08 25 0a 81 03 09 42 75 01 25 01 81 02 95 07 81 03 05 01 75 10 95 01 26 ff 0f 35 00 55 0e 65 11 09 30 46 71 0d 81 02 09 31 46 90 07 81 02 45 00 c0 05 0d 09 22 a1 02 09 51 75 08 25 0a 81 03 09 42 75 01 25 01 81 02 95 07 81 03 05 01 75 10 95 01 26 ff 0f 35 00 55 0e 65 11 09 30 46 71 0d 81 02 09 31 46 90 07 81 02 45 00 c0 05 0d 09 22 a1 02 09 51 75 08 25 0a 81 03 09 42 75 01 25 01 81 02 95 07 81 03 05 01 75 10 95 01 26 ff 0f 35 00 55 0e 65 11 09 30 46 71 0d 81 02 09 31 46 90 07 81 02 45 00 c0 05 0d 09 22 a1 02 09 51 75 08 25 0a 81 03 09 42 75 01 25 01 81 02 95 07 81 03 05 01 75 10 95 01 26 ff 0f 35 00 55 0e 65 11 09 30 46 71 0d 81 02 09 31 46 90 07 81 02 45 00 c0 05 0d 09 22 a1 02 09 51 75 08 25 0a 81 03 09 42 75 01 25 01 81 02 95 07 81 03 05 01 75 10 95 01 26 ff 0f 35 00 55 0e 65 11 09 30 46 71 0d 81 02 09 31 46 90 07 81 02 45 00 c0 05 0d 09 22 a1 02 09 51 75 08 25 0a 81 03 09 42 75 01 25 01 81 02 95 07 81 03 05 01 75 10 95 01 26 ff 0f 35 00 55 0e 65 11 09 30 46 71 0d 81 02 09 31 46 90 07 81 02 45 00 c0 05 0d 09 22 a1 02 09 51 75 08 25 0a 81 03 09 42 75 01 25 01 81 02 95 07 81 03 05 01 75 10 95 01 26 ff 0f 35 00 55 0e 65 11 09 30 46 71 0d 81 02 09 31 46 90 07 81 02 45 00 c0 05 0d 09 22 a1 02 09 51 75 08 25 0a 81 03 09 42 75 01 25 01 81 02 95 07 81 03 05 01 75 10 95 01 26 ff 0f 35 00 55 0e 65 11 09 30 46 71 0d 81 02 09 31 46 90 07 81 02 45 00 c0 05 0d 09 56 75 10 95 01 55 0c 66 01 10 47 ff ff 00 00 27 ff ff 00 00 81 02 85 08 09 55 75 08 25 0a b1 02 85 04 06 00 ff 09 c5 96 00 01 26 ff 00 b1 02 c0 06 00 ff 09 ff a1 01 85 09 09 ff 75 08 95 3f 15 00 26 ff 00 91 00 85 0a 09 ff 81 00 c0
N: MELF0411:00 1FD2:7012
I: 18 1fd2 7012

This is interesting to me; my approach to getting the module working for my devices was just to debug it and see where it was kicking out and paper over it. My idea about what was wrong is evidently wrong given these dumps...

wulf7 commented 3 years ago

Your touchscreen seems to be affected by 20-year old BSD HID parser bug. It (parser) wrongly counts all Cnst usages as paddings. Could you replace HMT_HI_ABSOLUTE macro with following one and test it again:

#define HMT_HI_ABSOLUTE(hi) \
    ((hi).usage != 0 && ((hi).flags & (HIO_VARIABLE|HIO_RELATIVE)) == HIO_VARIABLE)

After quick glance at touchpad report descriptor, I can't find anything wrong with him. Does it work with aforementioned change?

MrLightningBolt commented 3 years ago

Curious and something I hadn't tested: If I make iichid from master and load it, neither my touchpad nor touchscreen work. If I load it with the patch they both work. If I unload the patched and reload the unpatched module the touchscreen doesn't work but the touchpad does! I'm going to assume that there's something janky about the i2c controller in this laptop or something.

All that being said: the revised HMT_HI_ABSOLUTE macro works perfectly.

wulf7 commented 3 years ago

All that being said: the revised HMT_HI_ABSOLUTE macro works perfectly.

Great! Could you force-push new revision to make it mergeable in to iichid?

wulf7 commented 3 years ago

Merged. Thank you!