Привет. Есть sbc, Digi ConnectCore 6UL SBC Pro, к нему прицеплен по LVDS какой-то экран. К экрану прицеплен тачскрин с контроллером tsc2007, заведенный в sbc через i2c. На sbc установлен DIGI Embedded Yocto 2.6. В ядре добавлена поддержка тачскринов и поддержка tsc2007 (собран как часть ядра, не модуль). Тачскрин видится в системе и двигает курсор мыши при нажатии, но никогда не присылает события «нажатие/тап по экрану», только ABS_X, ABX_Y и ABS_PRESSURE, соответственно нажать ни на что нельзя, курсор просто ползает по экрану за пальцем. Тачскрин двигает курсор только при работе через evdev, через libinput не удалось заставить. xinput_calibrator так же не получает события о нажатии, поэтому калибровку пройти не могу. Положение пальца на эране в DE (matchbox) соответствует положению курсора, т.е. калибровка в принципе не нужна. ts_calibrator (или как там его) так же не видит нажатий, да еще и сильное различие между пальцем и откликом на экране (похоже, что в tslib, которую я никак не настраивал, границы тача указаны как 65535, а в evdev берутся с железа как 4095 или что-то в этом роде).
В device tree прописан примерно так:
&i2c1 {
touchscreen: tsc2007@48 {
compatible = "ti,tsc2007";
reg = <0x48>;
interrupt-parent = <&gpio3>;
interrupts = <21 0>;
gpios = <&gpio3 21 GPIO_ACTIVE_LOW>;
ti,x-plate-ohms = <500>;
status = "okay";
linux,wakeup;
wakeup-source;
};
Конфиги:
root@ccimx6ulsbc:~# cat /usr/share/X11/xorg.conf.d/10-evdev.conf
Section "InputClass"
Identifier "evdev pointer catchall"
MatchIsPointer "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
EndSection
Section "InputClass"
Identifier "evdev keyboard catchall"
MatchIsKeyboard "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
EndSection
Section "InputClass"
Identifier "evdev touchpad catchall"
MatchIsTouchpad "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
EndSection
Section "InputClass"
Identifier "evdev tablet catchall"
MatchIsTablet "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
EndSection
Section "InputClass"
Identifier "evdev touchscreen catchall"
MatchIsTouchscreen "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
EndSection
root@ccimx6ulsbc:~# cat /etc/X11/xorg.conf
Section "Device"
Identifier "Kernel Framebuffer Device"
Driver "fbdev"
Option "fbdev" "/dev/fb0"
EndSection
Section "ServerFlags"
Option "BlankTime" "0"
Option "StandbyTime" "0"
Option "SuspendTime" "0"
Option "OffTime" "0"
EndSection
Тесты:
root@ccimx6ulsbc:~# evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0: mca-cc6ul-pwrkey
/dev/input/event1: TSC2007 Touchscreen
Select the device event number [0-1]: 1
Input driver version is 1.0.1
Input device ID: bus 0x18 vendor 0x0 product 0x0 version 0x0
Input device name: "TSC2007 Touchscreen"
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 4095
Event code 1 (ABS_Y)
Value 4095
Min 0
Max 4095
Event code 24 (ABS_PRESSURE)
Value 4095
Min 0
Max 4095
Properties:
Testing ... (interrupt to exit)
Event: time 1565863240.820826, type 3 (EV_ABS), code 0 (ABS_X), value 866
Event: time 1565863240.820826, type 3 (EV_ABS), code 1 (ABS_Y), value 2031
Event: time 1565863240.820826, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 3523
Event: time 1565863240.820826, -------------- SYN_REPORT ------------
Event: time 1565863240.840968, type 3 (EV_ABS), code 0 (ABS_X), value 867
Event: time 1565863240.840968, type 3 (EV_ABS), code 1 (ABS_Y), value 2033
Event: time 1565863240.840968, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 3471
Event: time 1565863240.840968, -------------- SYN_REPORT ------------
...
...
root@ccimx6ulsbc:~# xinput test "TSC2007 Touchscreen"
motion a[0]=579 a[1]=2631 a[2]=3457
motion a[0]=590 a[1]=2640 a[2]=3444
motion a[0]=589 a[1]=2641 a[2]=3410
motion a[0]=579 a[1]=2637 a[2]=3277
motion a[0]=0 a[1]=4095 a[2]=4095
motion a[0]=542 a[1]=2512 a[2]=2420
motion a[0]=464 a[1]=2512 a[2]=3200
motion a[0]=463 a[1]=2512 a[2]=3290
motion a[1]=2513 a[2]=3328
motion a[1]=2511 a[2]=3348
...
...
Лог xorg:
root@ccimx6ulsbc:~# cat /var/log/Xorg.0.log
[ 192.956]
X.Org X Server 1.20.1
X Protocol Version 11, Revision 0
...
[ 193.305] (II) Using input driver 'evdev' for 'TSC2007 Touchscreen'
[ 193.305] (**) TSC2007 Touchscreen: always reports core events
[ 193.306] (**) evdev: TSC2007 Touchscreen: Device: "/dev/input/event1"
[ 193.307] (--) evdev: TSC2007 Touchscreen: Vendor 0 Product 0
[ 193.307] (--) evdev: TSC2007 Touchscreen: Found absolute axes
[ 193.307] (--) evdev: TSC2007 Touchscreen: Found x and y absolute axes
[ 193.307] (--) evdev: TSC2007 Touchscreen: Found absolute touchscreen
[ 193.308] (II) evdev: TSC2007 Touchscreen: Configuring as touchscreen
[ 193.308] (**) evdev: TSC2007 Touchscreen: YAxisMapping: buttons 4 and 5
[ 193.308] (**) evdev: TSC2007 Touchscreen: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
[ 193.308] (**) Option "config_info" "udev:/sys/devices/soc0/soc/2100000.aips-bus/21a0000.i2c/i2c-0/0-0048/input/input1/event1"
[ 193.308] (II) XINPUT: Adding extended input device "TSC2007 Touchscreen" (type: TOUCHSCREEN, id 6)
[ 193.309] (II) evdev: TSC2007 Touchscreen: initialized for absolute axes.
[ 193.312] (**) TSC2007 Touchscreen: (accel) keeping acceleration scheme 1
[ 193.312] (**) TSC2007 Touchscreen: (accel) acceleration profile 0
[ 193.312] (**) TSC2007 Touchscreen: (accel) acceleration factor: 2.000
[ 193.312] (**) TSC2007 Touchscreen: (accel) acceleration threshold: 4
[ 193.316] (II) config/udev: Adding input device mca-cc6ul-pwrkey (/dev/input/event0)
[ 193.317] (**) mca-cc6ul-pwrkey: Applying InputClass "evdev keyboard catchall"
[ 193.317] (II) Using input driver 'evdev' for 'mca-cc6ul-pwrkey'
[ 193.317] (**) mca-cc6ul-pwrkey: always reports core events
[ 193.317] (**) evdev: mca-cc6ul-pwrkey: Device: "/dev/input/event0"
[ 193.317] (--) evdev: mca-cc6ul-pwrkey: Vendor 0 Product 0
[ 193.317] (--) evdev: mca-cc6ul-pwrkey: Found keys
[ 193.318] (II) evdev: mca-cc6ul-pwrkey: Configuring as keyboard
[ 193.318] (**) Option "config_info" "udev:/sys/devices/soc0/soc/2100000.aips-bus/21a0000.i2c/i2c-0/0-007e/mca-cc6ul-pwrkey/input/input0/event0"
[ 193.318] (II) XINPUT: Adding extended input device "mca-cc6ul-pwrkey" (type: KEYBOARD, id 7)
[ 193.318] (**) Option "xkb_rules" "evdev"