主题 : 移植触摸屏遇到的问题,请大侠帮我支个招 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 76716
精华: 0
发帖: 47
金钱: 235 两
威望: 47 点
综合积分: 94 分
注册时间: 2012-08-28
最后登录: 2013-01-11
楼主  发表于: 2012-09-26 15:47

 移植触摸屏遇到的问题,请大侠帮我支个招

移植触模屏驱动到2.6.35.7碰到问题
移植过程:
0.硬件为友善Tiny210开发板
1.系统配置文件为内核自带的mini210_linu_defconfig复制到.config.
2.make menuconfig, 删除友善提供的一线触摸,增加三星四线触摸(源代码),删除友善mini210-adc,增加三星S5PXXXX ADC driver,
3.make编译内核,无问题
4.文件系统为光盘内编译好的QT镜像.
5.烧录系统,正常

现象:
(1).加载ROOT完成后,画面停在QT的那个绿色欢迎图片那里,"Tap anywhere on the screen to continue."

(2).点触摸幕没反应.

(3).内核启动打印信息显示,ADC和TS两个模块都成功加载.
adc    initialized

S5P TouchScreen got loaded  successfully :12bit
input: S5P TouchScreen as /devices/virtual/input/input0

(4).我在ts-s3c.c的static void touch_timer_fire(unsigned long data)函数中的,
input_report_abs(dev, ABS_X, xp);
input_report_abs(dev, ABS_Y, yp);
input_report_key(dev, BTN_TOUCH, 1);
input_report_abs(dev, ABS_PRESSURE, 1);
input_sync(dev);
这几行代码处,加入printk打印信息.

printk(KERN_ERR "x=%d,y=%d\n",xp,yp);
input_report_abs(dev, ABS_X, xp);
input_report_abs(dev, ABS_Y, yp);
input_report_key(dev, BTN_TOUCH, 1);
input_report_abs(dev, ABS_PRESSURE, 1);
input_sync(dev);
发现在点触模时,串口无坐标值信息打印
......................

(5).在终端输入命令: cat /proc/bus/input/devices 显示结果如下:
I: Bus=0013 Vendor=dead Product=beef Version=0101
N: Name="S5P TouchScreen"
P: Phys= input(ts)
S: Sysfs=/devices/virtual/input/input0
U: Uniq=
H: Handlers=mouse0 event0 evbug
B: EV=b
B: KEY=400 0 0 0 0 0 0 0 0 0 0
B: ABS=1000003

(6).在终端输入命令: cd /dev/input/
ls

显示结果如:event0  mice    mouse0

(7):到板子根文件系统,/bin目录下有一个QT初始化的脚本qtopia,在终端下输入命令:
#cat /bin/qtopia
内容如下:
#!/bin/sh

if [ -e /etc/friendlyarm-ts-input.conf ] ; then
        . /etc/friendlyarm-ts-input.conf
fi
true    ${TSLIB_TSDEVICE:=/dev/touchscreen}

TSLIB_CONFFILE=/etc/ts.conf

export TSLIB_TSDEVICE
export TSLIB_CONFFILE

export TSLIB_PLUGINDIR=/usr/lib/ts
export TSLIB_CALIBFILE=/etc/pointercal
export QTDIR=/opt/Qtopia
export QPEDIR=/opt/Qtopia
export PATH=$QTDIR/bin:$PATH
export LD_LIBRARY_PATH=$QTDIR/lib:/usr/local/lib:$LD_LIBRARY_PATH
export CAMERA_DEVICE=/dev/video3


if [ -c ${TSLIB_TSDEVICE} ]; then
        export QWS_MOUSE_PROTO="TPanel USB:/dev/input/mice"
if [ -e /etc/pointercal -a ! -s /etc/pointercal ] ; then
                rm /etc/pointercal
        fi

        if [ ! -e /etc/pointercal ]; then
                grep -Ei "\<skipcali=(1|y|yes)\>" /proc/cmdline >/dev/null && {
                        echo "-27 13757 -2071768 -9105 -32 34531248 65536 800 48
                                        >/etc/pointercal
                        sync
                }
        fi
else
        export QWS_MOUSE_PROTO="USB:/dev/input/mice"
        >/etc/pointercal
fi

export QWS_KEYBOARD=TTY:/dev/tty1
export KDEDIR=/opt/kde

export HOME=/root

exec $QPEDIR/bin/qpe 1>/dev/null 2>/dev/null

其中没有大家所说的“TS_INFO_FILE=/sys/devices/virtual/input/input0/uevent ”内容。


刚接触linux,对驱动的结构不熟悉,请各位路过的朋友指明一下思路,可能是哪部分出问题了呢?
[ 此帖被murong22在2012-09-26 15:55重新编辑 ]
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
1楼  发表于: 2012-09-26 16:26
据我所知,Tiny210硬件上用的是One Wire的触摸屏,它使用的是对应的一线触摸屏的驱动。就算你加载了S5PV210内建的touch controller驱动,也没法驱动触摸屏啊。
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 76716
精华: 0
发帖: 47
金钱: 235 两
威望: 47 点
综合积分: 94 分
注册时间: 2012-08-28
最后登录: 2013-01-11
2楼  发表于: 2012-09-27 17:03

 回 1楼(kasim) 的帖子

谢谢您的关注,S5PV210里边的XP XM YP YM我通过引线连接到触摸屏的。使用的是芯片的TOUCH SCREEN 1
级别: 侠客
UID: 54383
精华: 0
发帖: 61
金钱: 315 两
威望: 63 点
综合积分: 122 分
注册时间: 2011-08-29
最后登录: 2016-09-14
3楼  发表于: 2012-10-11 09:57
请问这个问题最后解决了吗?遇到的问题跟你一样