移植过程:
1.系统配置文件为内核自带的s3c2410_defconfig稍微修改而得来.
2.将友善光盘自带的2.6.29内核中的
s3c2410_ts.c, mini2440_adc.c, s3c24xx-adc.h这三个文件编译到2.6.30.4内核的对应位置.
3.在内核配置中,将这两个模块选上. 另对比了一下友善2.6.29配置文件的input device部分,没有发现异常.
4.文件系统为光盘内编译好的QT镜像.
现象:
(1).加载ROOT完成后,画面停在QT的那个绿色欢迎图片那里,"Tap anywhere on the screen to continue."
(2).点触摸幕没反应.
(3).内核启动打印信息显示,ADC和TS两个模块都成功加载.
adc initialized
s3c2410 TouchScreen successfully loaded
input: s3c2410 TouchScreen as /class/input/input0(4).我在s3c2410_ts.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打印信息.
tmp =xp;
xp=yp;
yp=tmp;
xp>>=2;
xp>>=2;
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);
发现在点触模时,串口会有坐标信息打印出来:
x=475,y=453
x=476,y=451
x=487,y=453
......................
(5).在终端输入命令:
cat /proc/bus/input/devices 显示结果如下:
I: Bus=0013 Vendor=dead Product=beef Version=0101
N: Name="s3c2410 TouchScreen"
P: Phys=
S: Sysfs=/class/input/input0
U: Uniq=
H: Handlers=event0 evbug
B: EV=b
B: KEY=0
B: ABS=1000003
刚接触linux,对驱动的结构不熟悉,请各位路过的朋友指明一下思路,可能是哪部分出问题了呢?
[ 此帖被illidan在2009-12-09 09:54重新编辑 ]