标签:style blog color io os ar for sp 文件
修改两个文件/arch/arm/mach-s3c2440/mach-smdk2440.c
和
linux-3.0-s3c2440/drivers/input/touchscreen/s3c2410_ts.c
1 /arch/arm/mach-s3c2440/mach-smdk2440.c
2
3 +#include <plat/ts.h> /*Add by guowenxue to support Touch screen, 2011.09.06*/
4
5 +/*Touch Screen driver info add by guowenxue 2011.09.04 */
6 +static struct s3c2410_ts_mach_info smdk2440_ts_cfg __initdata = {
7 + .delay = 10000,
8 + .presc = 49,
9 + .oversampling_shift = 2,
10 +};
11 +
12
13
14 static struct platform_device *smdk2440_devices[] __initdata = {
15 @@ -155,19 +295,48 @@
16 &s3c_device_wdt,
17 &s3c_device_i2c0,
18 &s3c_device_iis,
26 + &s3c_device_adc, /* Add Touch Screen driver by guowenxue, 2011.09.06*/
27 + &s3c_device_ts, /* Add Touch Screen driver by guowenxue, 2011.09.06*/
30 +#endif
31 };
32
33
34
35 static void __init smdk2440_machine_init(void)
36 {
37 s3c24xx_fb_set_platdata(&smdk2440_fb_info);
38 + s3c24xx_ts_set_platdata(&smdk2440_ts_cfg); /*Add Touch Screen info by guowenxue, 2011.09.06*/
39 s3c_i2c0_set_platdata(NULL);
40 + i2c_register_board_info(0, smdk2440_i2c_devs, ARRAY_SIZE(smdk2440_i2c_devs));
41
42 platform_add_devices(smdk2440_devices, ARRAY_SIZE(smdk2440_devices));
43 smdk_machine_init();
44
45
46
47 /drivers/input/touchscreen/s3c2410_ts.c
48 +++ linux-3.0-s3c2440/drivers/input/touchscreen/s3c2410_ts.c 2013-07-28 11:44:58.555435668 +0800
49 @@ -126,6 +126,7 @@
50 input_report_abs(ts.input, ABS_Y, ts.yp);
51
52 input_report_key(ts.input, BTN_TOUCH, 1);
53 + input_report_abs(ts.input, ABS_PRESSURE, 1); /* Add by guowenxue, 2012.03.30 */
54 input_sync(ts.input);
55
56 ts.xp = 0;
57 @@ -140,6 +141,7 @@
58 ts.count = 0;
59
60 input_report_key(ts.input, BTN_TOUCH, 0);
61 + input_report_abs(ts.input, ABS_PRESSURE, 0); /* Add by guowenxue, 2012.03.30 */
62 input_sync(ts.input);
63
64 writel(WAIT4INT | INT_DOWN, ts.io + S3C2410_ADCTSC);
65 @@ -314,10 +316,11 @@
66 }
67
68 ts.input = input_dev;
69 - ts.input->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
70 + ts.input->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS) | BIT(EV_SYN); /* Modify by guowenxue, 2012.03.30 */
71 ts.input->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH);
72 input_set_abs_params(ts.input, ABS_X, 0, 0x3FF, 0, 0);
73 input_set_abs_params(ts.input, ABS_Y, 0, 0x3FF, 0, 0);
74 + input_set_abs_params(ts.input, ABS_PRESSURE, 0, 1, 0, 0); /* Add by guowenxue, 2012.03.30 */
75
76 ts.input->name = "S3C24XX TouchScreen";
77 ts.input->id.bustype = BUS_HOST;
FL2440移植LINUX-3.4.2 -- 内核自带的触摸屏驱动移植
标签:style blog color io os ar for sp 文件
原文地址:http://www.cnblogs.com/chrispauls/p/4045865.html