移植触模屏驱动到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重新编辑 ]