Android 平台电容式触摸屏硬件基本原理:
http://blog.csdn.net/dearsq/article/details/51251025
Android 平台电容式触摸屏的驱动基本原理:
http://blog.csdn.net/dearsq/article/details/51251009
在了解了上面两部分的知识后,我们以展讯 SC7731 平台为例子,介绍 Android 5.1 下 TP 的移植步骤。
1.在 kernel/drivers/input/touchscreen 下添加驱动文件夹 gslx680/
2.修改本目录下的 Makefile 编译选项
obj-$(CONFIG_TOUCHSCREEN_GSLX680) += gslx680/
3.修改 Kconfig 文件
config TOUCHSCREEN_GSLX680
tristate "gslx680 touchsreen driver"
depends on I2C
help
Say Y here if you have a FOCALTECH based touchscreen
controller.
If unsure, say N.
To compile this driver as a module, choose M here: the
module will be called gslx680_ts.o
4.去平台的 deconfig 文件中打开 CONFIG_TOUCHSCREEN_GSLX680 宏
5.修改 dts
gslX680_ts@40{
compatible = "gslX680,gslX680_ts";
reg = <0x40>;
gpios = <&d_gpio_gpio 81 0 &d_gpio_gpio 82 0>;
vdd_name = "vdd28";
virtualkeys = <130 580 80 60 373 580 80 60 560 580 80 60>;
TP_MAX_X = <1024>;
TP_MAX_Y = <600>;
};