移植触摸屏驱动到linux3.4.2
1. 修改drivers/input/touchscreen/下的Makefile
#obj-$(CONFIG_TOUCHSCREEN_S3C2410) += s3c2410_ts.o
obj-$(CONFIG_TOUCHSCREEN_S3C2410) += s3c_ts.o
2.重新配置menuconfig
make menuconfig,将touchscreen编译进内核
3. 修改.config,找到CONFIG_TOUCHSCREEN_S3C2410,修改为
# CONFIG_TOUCHSCREEN_ILI210X is not set CONFIG_TOUCHSCREEN_S3C2410=y # CONFIG_TOUCHSCREEN_GUNZE is not set
4. make uImage
5. 下载新内核,启动开发板,cd /mnt
6. cd ts_dir
7. cp * / -rfd
8. sh tslib.sh
9. 执行ts_calibrate以及ts_test,成功
/mnt # ts_calibrate
xres = 480, yres = 272
Took 3 samples...
Top left : X = 267 Y = 157
Took 4 samples...
Top right : X = 270 Y = 873
Took 4 samples...
Bot right : X = 743 Y = 871
Took 3 samples...
Bot left : X = 741 Y = 150
Took 4 samples...
Center : X = 504 Y = 507
-33.081360 0.005015 0.528829
-46.786865 0.363238 -0.001267
Calibration constants: -2168020 328 34657 -3066224 23805 -83 65536
/mnt # ts_test
1792.029177: 372 24 1
1792.045631: 371 24 1
1792.051086: 371 25 0
1793.147675: 109 137 1
1793.165649: 109 138 1
1793.185634: 109 142 1
1793.251078: 107 159 0
1793.369837: 83 157 1
1793.385710: 83 157 1
1793.405633: 83 159 1