This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/TSC200XSW-LINUX: Click support for tsc2007 driver on a raspberry

Part Number: TSC200XSW-LINUX
Other Parts Discussed in Thread: TSC2007

Tool/software: Linux

Hi,

I use tsc2007 driver for my touchscreen on a raspberry. The raspberry runs on a 4.4.24-7+ linux kernel. I used tsc2007.c that I found in the kernel main line on gitHub. I then complied it directly on the pi and added it with depmod and modpropbe. Finally, I added a device_tree overlay that you can find here (that I created from the base here).

The touchscreen works mostly properly. I can calibrate it with ts_calibrate tool, and test it with ts_test. The last issue is the click event. I can not click any elements of my GUI, I can only move the cursor.

When I test my touchscreen with evtest, I see that the driver only triggers BTN_TOUCH event, while a mouse triggers BTN_LEFT. One way to do what I want is to modify the module to emit a BTN_LEFT instead of a BTN_TOUCH. But in kernel.org, it is said that : "

BTN_{MOUSE,LEFT,MIDDLE,RIGHT} must not be reported as the result of touch
contact. BTN_TOOL_<name> events should be reported where possible.

"

Is there a better way to do that ?

Thanks,

Nathanaël.