Modify file:
1. Add vid PID to hid-ids.h
2. Add the following content to hid-multitouch.. C-> mt_devices []:
{
. Driver_data = mt_cls_default,
Hid_usb_device (VID, pid)
}
3, in the hid-core.c-> hid_have_special_driver [] add hid_usb_device (VID, pid) Certificate ----------------------- 4: Add Kernel configuration options: 5: 7: Kernel ------------------------- 8: the http://source.android.com/tech/input/input-device-configuration-files.html adds the upper-layer IDC File according to this website: 9:
# Copyright (c) 2012 Beijing irtouch Systems Co ., ltd ### input device configuration file for the irtouch touch screen. # basic parameterstouch. devicetype = touchscreentouch. orientationaware = 1 #0 external device, 1 internal device. internal = 1 # Touch size # Touch. touchsize. calibration = pressure # Touch. toolsize. calibration = Linear # Touch. toolsize. linearscale = 10 # Touch. toolsize. linearbias = 160 # Touch. toolsize. issummed = 1 # size # Touch. size. calibration = diameter # Touch. size. scale = 10 # Touch. size. bias = 0 # Touch. size. issummed = 0 # scale, surface, proportion; # bias, deviation # summed summary # pressure-/amplure amplitude # Touch. pressure. calibration = amplation # Touch. pressure. scale = 0.005 # orientation direction-/calibrate touch. orientetion. calibration = none
Certificate ---------------------------------------------------------------------------------------------------------------------------------------------------
The IDC File above cannot be used. The following IDC File is used. The Android touch screen IDC File is generally used. I can use this IDC File below. The knowledge touch screen has no mouse arrow, however, when you click the mouse, the mouse clicks the mouse and the mouse clicks the mouse.:
# Copyright (C) 2010 The Android Open Source Project## Licensed under the Apache License, Version 2.0 (the "License");# you may not use this file except in compliance with the License.# You may obtain a copy of the License at## http://www.apache.org/licenses/LICENSE-2.0## Unless required by applicable law or agreed to in writing, software# distributed under the License is distributed on an "AS IS" BASIS,# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.# See the License for the specific language governing permissions and# limitations under the License.## Emulator keyboard configuration file #1.## Basic Parameterstouch.deviceType = touchScreentouch.orientationAware = 1touch.size.calibration=diametertouch.size.scale=10touch.size.bias=0touch.size.isSummed=0touch.size.pressure.calibration=amplitudetouch.pressure.scale=0.005touch.orientation.calibration=none
Export -------------------- 10: ADB shell su mount Mount-w-O remount/dev/block/platform/OMAP/omap_hsmmc.0/by-name/system/SystemChmod 777/system/usr/IDC=> Modify the write permission of the IDC File. ADB push/home/tonsincs/vendor_0416_product_5030_version_0110.idc/system/usr/IDC/------------------------------------------------------------------------------------------------------------------------------- -------------------------- 11: there is also a way to put IDC files in the/system/usr/IDC/directory: 1) copy your IDC files to the android source code: frameworks/base/data/keyboards/directory; 2) Modify common. MK file: 3) Croot to the android source code root directory: Make -After J8 is complete, find the command in the out directory to find ...... The results are as follows: OK; finally ------------------------ Summary: Recently, we have been porting the touch screen driver under Android (4.1) and have been exposed to several touch screens. In general, either the touch screen when the standard HID device to use, this transplant is simple, the touch screen Vid/PID added to the hid-ids.h hid-core.c hid-multitouch.c file, in addition, the upper-layer/system/usr/IDC/vendor_xxx_product_xxx.idc file must be used with the touch screen. Otherwise, your touch screen will look like a notebook touchpad! Modify Drivers/input/touchscreen/usttouchscreen. you can add your touch screen driver to the C file, but this is troublesome. You need to know how to write the driver, how to implement some functions, and how to implement algorithms; also come in touch with the I2C bus touch screen driver, this is a little more troublesome, to register your touch screen driver I2C bus information according to your arch/ARM/Mach-xxxx/board-xxx.c file; add your driver source code. In general, it is troublesome to write a driver. You must have a circuit schematic diagram and a chip data manual. You must also understand how to implement these algorithms, I also need to know the Linux driver, where your driver is mounted, I2C bus, USB bus, and a lot of protocols. I have a lot of knowledge about it. The 287-page English is very troublesome! Learning slowly! The above is my understanding! My work notes too! In case you forget to check it! It is also for reference by beginners! Certificate -------------------------------------------------------------------------------------------------------------------------------------------------------------