下载后可任意编辑基于 ilitek 的电容屏驱动程序的分析 首先,将驱动的代码粘贴出来先,在第二篇我再对整个驱动程序进行进一步的分析(http://linhui.568.blog.163.com/blog/static/962652682024786352856/):/* Copyright (c) 2024 by ilitek Technology. All rights reserved. ilitek I2C touch screen driver for Android platform Author: Steward Fu Version: 1 History: 2024/10/26 Firstly released 2024/10/28 Combine both i2c and hid function together 2024/11/02 Support interrupt trigger for I2C interface 2024/11/10 Rearrange code and add new IOCTL command 2024/11/23 Support dynamic to change I2C address 2024/12/21 Support resume and suspend functions 2024/12/23 Fix synchronous problem when application and driver work at the same time 2024/12/28 Add erasing background before calibrating touch panel 2024/01/13 Rearrange code and add interrupt with polling method 2024/01/14 Add retry mechanism 2024/01/17 Support multi-point touch 2024/01/21 Support early suspend function 2024/02/14 Support key button function 2024/02/18 Rearrange code 2024/03/21 Fix counld not report first point 2024/03/25 Support linux 2.36.x */#include
#include #include #include #include #include #include #include #include #include #include 下载后可任意编辑#include #include #ifdef CONFIG_HAS_EARLYSUSPEND#include #include #endif//#define COORDINATE_KEY//#define ILITEK_SLEEP_MODEint touch_key_hold_press = 0;int touch_key_code[] = {KEY_SEARCH, KEY_MENU, KEY_BACK, KEY_HOME};int touch_key_press[] = {0, 0, 0, 0};// definitions#define ILITEK_I2C_RETRY_COUNT 3#define ILITEK_I2C_DRIVER_NAME "ilitek_i2c"#define ILITEK_F...