之前移植过两次,都没有成功,编译内核时报错
今天终于成功了:
1:拷贝s3c2410_touchscreen.patch到内核存放文件夹
进入内核文件夹,打补丁:patch -p1 < ../s3c2410_touchscreen.patch
2:vi arch/arm/mach-s3c2410/mach-smdk2410.c
添加:
#include <asm/arch/ts.h>
添加:
static struct s3c2410_ts_mach_info smdk2410_ts_cfg __initdata = {
.delay = 20000,
.presc = 49,
.oversampling_shift = 2,
};
在smdk2410_devices[]中
添加:
&s3c_device_ts,
在smdk2410_map_io
添加:
set_s3c2410ts_info(&smdk2410_ts_cfg);
3:vi driver/input/touchscreen/Makefile
添加:
obj-$(CONFIG_TOUCHSCREEN_S3C2410) += s3c2410_ts.o
4:
拷贝s3c2410_ts.c 到 driver/input/touchscreen/
5:配置make menuconfig
Device Drivers --->
Input device support --->
[*] Touchscreens --->
<*> Samsung S3C2410 touchscreen input driver
[*] Samsung S3C2410 touchscreen debug messages
最后
make