Touch
1. I2C Touch
Taking M5-R1 as an example, this board currently has one I2C interface touch interface. The currently adapted touch driver for this interface is gt9xx.
2. Touch Debugging
The touch screen belongs to the input subsystem device. The input subsystem is a unified driver framework provided by Linux for input devices. Input devices like keys, keyboards, touch screens, and mice have similar driver methods. Input devices driven by the input subsystem can submit to the kernel through a unified data structure, which includes input time, type, code, and specific key values or coordinates. The kernel passes this to user space through file interfaces in the /dev/input directory.
The input subsystem device can obtain events reported to the system via the getevent command.
root@rk3588-buildroot:/# ls /dev/input/
by-path event0 event1 event2 event3 event4 event5
root@rk3588-buildroot:/# evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0: rk805 pwrkey
/dev/input/event1: headset-keys
/dev/input/event2: rockchip-es8388 Headset
/dev/input/event3: bt-powerkey
/dev/input/event4: adc-keys
/dev/input/event5: rockchip-hdmi1 rockchip-hdmi1
Select the device event number [0-5]: 5
Input driver version is 1.0.1
Input device ID: bus 0x0 vendor 0x0 product 0x0 version 0x0
Input device name: "rockchip-hdmi1 rockchip-hdmi1"
Supported events:
Event type 0 (EV_SYN)
Event type 5 (EV_SW)
Event code 6 (SW_LINEOUT_INSERT) state 0
Properties:
Testing ... (interrupt to exit)
Event: time 1609504724.413926, type 5 (EV_SW), code 6 (SW_LINEOUT_INSERT), value 1
Event: time 1609504724.413926, -------------- SYN_REPORT ------------
Event: time 1609504739.890499, type 5 (EV_SW), code 6 (SW_LINEOUT_INSERT), value 0
Event: time 1609504739.890499, -------------- SYN_REPORT ------------