Android 增加 Happy Touch 触摸屏支持

1、在hid-ids.h中加入vid pid

#define USB_VENDOR_ID_HAPPYTOUCH	0x0416
#define USB_DEVICE_ID_HAPPYTOUCH_SCREEN	0x5030

2、在hid-multitouch.c->mt_devices[] 中加入

{ .driver_data = MT_CLS_DEFAULT,
HID_USB_DEVICE(USB_VENDOR_ID_HAPPYTOUCH,
USB_DEVICE_ID_HAPPYTOUCH_SCREEN) }

3、在hid-core.c->hid_have_special_driver[]中加入HID_USB_DEVICE(VID,PID)

{ HID_USB_DEVICE(USB_VENDOR_ID_HAPPYTOUCH,USB_DEVICE_ID_HAPPYTOUCH_SCREEN)}

4、设置kernel编译变量

$ export ARCH=arm
$ export SUBARCH=arm
$ export CROSS_COMPILE=arm-eabi-

5、在内核的config文件中,确认驱动中是否添加了hid-multitouch模块

运行make menuconfig后,将HID Multitouch panels选上。

$ make clear
$ make mrproper
$ make menuconfig
Device Drivers --->
HID Devices --->
Special HID Drivers --->
HID Multitouch panels

6、编译hid-multitouch.ko

$ make prepare
$ make scripts
$ make M=drivers/hid

关于如何单独编译kernel驱动的方法,请点击这里

7、设置触摸屏

Android触摸屏设置方法请点击 这里