hi to all,
am using imx51 with freescale provide LTIB31 and added qt application. now i want to enable touchscreen. i already enabled tslib package and also done calibration in the following way:
mknod /dev/input/tslib0 c 13 65
export TSLIB_TSDEVICE=/dev/input/tslib0
rm -f /etc/pointercal
ts_calibrate
but still touchscreen not working.. pls someone help me as soon as possible.
thanks in advance,
shakthi
Hi,
I m using ClickTouch projected capacitive mutitouch in imx537 customised board.I have interface through i2c, which is initiated perfectly and gives "input: ClickTouch Touchscreen as /devices/platform/imx-i2c.1/i2c-1/1-001f/input/input1" message at the time of booting.I can see the cursor on center of screen when I executing Qt (with tslib) application. Whether we really needed tslib for capacitive touchscreen? Please Advice me on this issue.
For those who might run into this same problem. In my case, I'm using the LVDS display with EGALAXY touchscreen. Here's what I wound up doing to get the touchscreen calibrated and operating properly under the minimal Linux configuration (with the addition of Qt Embedded with associated Touch Screen library - tslib).
First and foremost, you must change the egalaxy touch screen driver to disable multi-touch. (The Freescale patches add conditional code to support switching to single-touch, but they don't actually do so.)
1. Define the following prior to the #include statements within ltib/rpm/BUILD/linux/drivers/input/touchscreen/egalax_ts.c
*** egalax_ts.c.original 2012-02-17 12:40:56.667199603 -0800
--- egalax_ts.c 2012-02-17 13:13:35.202577479 -0800
***************
*** 29,34 ****
--- 29,38 ----
- early suspend support for android
*/
+ // Turn off multi-touch so ts_calibrate and other packages like Qt
+ // can correctly interpret the information returned by the driver.
+ #define FORCE_SINGLE_POINTER_SUPPORT
+
#include <linux/module.h>
#include <linux/init.h>
#include <linux/i2c.h>
2. Rebuild the kernel with the change. The subsequent steps are all on the target.
3. On the target system, discover which input device the touchscreen is on. You can do this by using
cat /dev/input/<name> | od -x
where <name> is event0, event1, ts0, etc - all the items listed under /dev/input that might be it. After you run the above command on a given name, touch the touchscreen to see if there is anything coming from that device. If not, move on to the next one.
4. Set up the tslib environmental variables. Here's what I have:
export TSLIB_TSEVENTTYPE=INPUT
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_CONFFILE=/etc/ts.conf
export TSLIB_PLUGINDIR=/usr/lib/ts
export TSLIB_TSDEVICE=/dev/input/event2
5. Define the TSLIB_CONFFILE contents. At the present, I'm using:
$ cat /etc/ts.conf
module_raw input
module pthres pmin=1
module variance delta=30
module dejitter delta=100
module linear
6. Run ts_calibrate
ts_calibrate
If that doesn't work, try ts_print_raw and ts_test to see if you can see any activity. (It was by using ts_print_raw that I discovered that the touch screen was spewing out a lot of data and it was all zeros for the position - which is what made me look at the driver to figure out why the data from the touch screen driver wasn't matching the expectations for the touch structure in tslib.)
7. Set up Qt environmental variables
export QT_QWS_FONTDIR=/usr/lib/fonts
export QWS_MOUSE_PROTO=Tslib:/dev/input/event2
export QWS_SIZE=1024*768
export POINTERCAL_FILE=/etc/pointercal
8. Calibrate Qt mouse (not sure if this is strictly necessary since ts_calibration already builds the /etc/pointercal file).
/usr/local/Trolltech/examples/qws/mousecalibration
I'm a complete novice at this, but this got me up and going with a minimal environment (minimal Linux install, tslib, Qt embedded - without X11). I may find later that I need better graphics performance in which case I'll look at converting over to Qt-X11, but for now I'm at least operational. Since most folks seem to be running the touch panel under X, hopefully this alternate configuration will help others like me who are using a more minimal configuration.
export TSLIB_TSDEVICE=/dev/inut/even0 , or even1, or even2, some thing alike, not need to create device by your own