Trouble in porting tc1126/tcm1680/cn1100 ts driver, no btn_touch event?
far5893
far5893 at iperbole.bologna.it
Mon Dec 18 08:43:44 UTC 2017
I'm trying to port old 3.4 (Allwinner BSP) ts1126 driver to 4.14. manline kernel ,
here git of effort
https://github.com/miky2k/tc1126
Driver is in file cn1100.c and input reporting is in Report_Coordinate_Wait4_SingleTime function.
it semmes partially working(see logs) but no mouse move or click under x11.
here X log:
> [ 16.073] (II) config/udev: Adding input device tc1126_ts (/dev/input/event2)
> [ 16.073] (**) tc1126_ts: Applying InputClass "evdev touchscreen catchall"
>
> [ 16.073] (II) Using input driver 'evdev' for 'tc1126_ts'
> [ 16.073] (**) tc1126_ts: always reports core events
> [ 16.073] (**) evdev: tc1126_ts: Device: "/dev/input/event2"
> [ 16.074] (--) evdev: tc1126_ts: Vendor 0 Product 0
> [ 16.074] (--) evdev: tc1126_ts: Found absolute axes
> [ 16.074] (--) evdev: tc1126_ts: Found absolute multitouch axes
> [ 16.074] (II) evdev: tc1126_ts: No buttons found, faking one.
> [ 16.074] (--) evdev: tc1126_ts: Found x and y absolute axes
> [ 16.074] (--) evdev: tc1126_ts: Found absolute touchscreen
>
> [ 16.074] (II) evdev: tc1126_ts: Configuring as touchscreen
> [ 16.074] (**) evdev: tc1126_ts: YAxisMapping: buttons 4 and 5
> [ 16.074] (**) evdev: tc1126_ts: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
> [ 16.074] (**) Option "config_info" "udev:/sys/devices/virtual/input/input2/event2"
> [ 16.075] (II) XINPUT: Adding extended input device "tc1126_ts" (type: TOUCHSCREEN, id 10)
> [ 16.075] (II) evdev: tc1126_ts: initialized for absolute axes.
> [ 16.076] (**) tc1126_ts: (accel) keeping acceleration scheme 1
> [ 16.076] (**) tc1126_ts: (accel) acceleration profile 0
> [ 16.076] (**) tc1126_ts: (accel) acceleration factor: 2.000
> [ 16.076] (**) tc1126_ts: (accel) acceleration threshold: 4
> [ 16.077] (II) config/udev: Adding input device tc1126_ts (/dev/input/mouse0)
> [ 16.077] (II) No input driver specified, ignoring this device.
> [ 16.078] (II) This device may have been added with another device file.
and here evtest output:
> Available devices:
> /dev/input/event0: 1c22800.lradc
> /dev/input/event1: axp20x-pek
> /dev/input/event2: tc1126_ts
> /dev/input/event3: USB Keyboard
> /dev/input/event4: USB Keyboard
> Select the device event number [0-4]: 2
> Input driver version is 1.0.1
> Input device ID: bus 0x18 vendor 0x0 product 0x0 version 0x0
> Input device name: "tc1126_ts"
> Supported events:
> Event type 0 (EV_SYN)
> Event type 1 (EV_KEY)
> Event code 330 (BTN_TOUCH)
> Event type 3 (EV_ABS)
> Event code 0 (ABS_X)
> Value 0
> Min 0
> Max 1024
> Event code 1 (ABS_Y)
> Value 0
> Min 0
> Max 600
> Event code 47 (ABS_MT_SLOT)
> Value 0
> Min 0
> Max 0
> Event code 53 (ABS_MT_POSITION_X)
> Value 0
> Min 0
> Max 1024
> Event code 54 (ABS_MT_POSITION_Y)
> Value 0
> Min 0
> Max 600
> Event code 57 (ABS_MT_TRACKING_ID)
> Value 0
> Min 0
> Max 10
> Properties:
> Testing ... (interrupt to exit)
> Event: time 1513351359.883920, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 0
> Event: time 1513351359.883920, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 851
> Event: time 1513351359.883920, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 178
> Event: time 1513351359.883920, type 3 (EV_ABS), code 0 (ABS_X), value 851
> Event: time 1513351359.883920, type 3 (EV_ABS), code 1 (ABS_Y), value 178
> Event: time 1513351359.883920, -------------- SYN_REPORT ------------
> Event: time 1513351359.902363, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 0
> Event: time 1513351359.902363, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 851
> Event: time 1513351359.902363, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 178
> Event: time 1513351359.902363, -------------- SYN_REPORT ------------
> Event: time 1513351359.920729, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 0
> Event: time 1513351359.920729, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 851
> Event: time 1513351359.920729, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 178
> Event: time 1513351359.920729, -------------- SYN_REPORT ------------
> Event: time 1513351359.939115, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 0
> Event: time 1513351359.939115, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 851
> Event: time 1513351359.939115, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 178
> Event: time 1513351359.939115, -------------- SYN_REPORT ------------
> Event: time 1513351359.957507, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 0
> Event: time 1513351359.957507, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 851
> Event: time 1513351359.957507, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 178
> Event: time 1513351359.957507, -------------- SYN_REPORT ------------
> Event: time 1513351359.975899, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 0
> Event: time 1513351359.975899, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 851
> Event: time 1513351359.975899, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 178
> Event: time 1513351359.975899, -------------- SYN_REPORT ------------
> Event: time 1513351359.994288, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 0
> Event: time 1513351359.994288, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 851
> Event: time 1513351359.994288, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 178
> Event: time 1513351359.994288, -------------- SYN_REPORT ------------
> Event: time 1513351360.012650, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 0
> Event: time 1513351360.012650, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 851
> Event: time 1513351360.012650, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 178
> Event: time 1513351360.012650, -------------- SYN_REPORT ------------
> Event: time 1513351360.031048, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 0
> Event: time 1513351360.031048, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 851
> Event: time 1513351360.031048, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 178
> Event: time 1513351360.031048, -------------- SYN_REPORT ------------
> Event: time 1513351364.740335, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 0
> Event: time 1513351364.740335, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 837
> Event: time 1513351364.740335, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 216
> Event: time 1513351364.740335, type 3 (EV_ABS), code 0 (ABS_X), value 837
> Event: time 1513351364.740335, type 3 (EV_ABS), code 1 (ABS_Y), value 216
on /dev/input/mouse0 i read :
> Device open OK
> right-click to set absolute x,y coordinates origin (0,0)
> bLEFT:0, bMIDDLE: 0, bRIGHT: 0, rx: 129 ry=127
> Absolute coords from TOP_LEFT= 130 -127
> 18 81 7F 00 50 9B F8 B6 2C 01 00 00 00 00 00 00
> bLEFT:0, bMIDDLE: 0, bRIGHT: 0, rx: 129 ry=127
> Absolute coords from TOP_LEFT= 259 -254
> 18 81 7F 00 50 9B F8 B6 2C 01 00 00 00 00 00 00
> bLEFT:0, bMIDDLE: 0, bRIGHT: 0, rx: 129 ry=113
> Absolute coords from TOP_LEFT= 388 -367
> 18 81 71 00 50 9B F8 B6 2C 01 00 00 00 00 00 00
> bLEFT:0, bMIDDLE: 0, bRIGHT: 0, rx: 160 ry=0
> Absolute coords from TOP_LEFT= 548 -367
> 18 A0 00 00 50 9B F8 B6 2C 01 00 00 00 00 00 00
> bLEFT:0, bMIDDLE: 0, bRIGHT: 0, rx: 12 ry=239
> Absolute coords from TOP_LEFT= 560 -606
> 28 0C EF 00 50 9B F8 B6 2C 01 00 00 00 00 00 00
> bLEFT:0, bMIDDLE: 0, bRIGHT: 0, rx: 6 ry=244
> Absolute coords from TOP_LEFT= 566 -850
I'm not a kernel developer so troubleshooting is quite difficult for me (there is a lot of documentation),
can someone give me a hit on what to check ?
Miky
More information about the Input-tools
mailing list