资源简介
gt911芯片驱动gt911芯片驱动gt911芯片驱动gt911芯片驱动gt911芯片驱动
代码片段和文件信息
/* drivers/input/touchscreen/goodix_tool.c
*
* 2010 - 2012 Goodix Technology.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be a reference
* to you when you are integrating the GOODiX‘s CTP IC into your system
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* Version:2.2
* V1.0:2012/05/01create file.
* V1.2:2012/06/08modify some warning.
* V1.4:2012/08/28modified to support GT9XX
* V1.6:new proc name
* V2.2: compatible with Linux 3.10 2014/01/14
*/
#include “gt9xx.h“
#define DATA_LENGTH_UINT 512
#define CMD_HEAD_LENGTH (sizeof(st_cmd_head) - sizeof(u8*))
static char procname[20] = {0};
#define UPDATE_FUNCTIONS
#ifdef UPDATE_FUNCTIONS
extern s32 gup_enter_update_mode(struct i2c_client *client);
extern void gup_leave_update_mode(void);
extern s32 gup_update_proc(void *dir);
#endif
extern void gtp_irq_disable(struct goodix_ts_data *);
extern void gtp_irq_enable(struct goodix_ts_data *);
#pragma pack(1)
typedef struct{
u8 wr; //write read flag,0:R 1:W 2:PID 3:
u8 flag; //0:no need flag/int 1: need flag 2:need int
u8 flag_addr[2]; //flag address
u8 flag_val; //flag val
u8 flag_relation; //flag_val:flag 0:not equal 1:equal 2:> 3:<
u16 circle; //polling cycle
u8 times; //plling times
u8 retry; //I2C retry times
u16 delay; //delay befor read or after write
u16 data_len; //data length
u8 addr_len; //address length
u8 addr[2]; //address
u8 res[3]; //reserved
u8* data; //data pointer
}st_cmd_head;
#pragma pack()
st_cmd_head cmd_head;
static struct i2c_client *gt_client = NULL;
static struct proc_dir_entry *goodix_proc_entry;
static ssize_t goodix_tool_read(struct file * char __user * size_t loff_t *);
static ssize_t goodix_tool_write(struct file * const char __user * size_t loff_t *);
static const struct file_operations tool_ops = {
.owner = THIS_MODULE
.read = goodix_tool_read
.write = goodix_tool_write
};
//static s32 goodix_tool_write(struct file *filp const char __user *buff unsigned long len void *data);
//static s32 goodix_tool_read( char *page char **start off_t off int count int *eof void *data );
static s32 (*tool_i2c_read)(u8 * u16);
static s32 (*tool_i2c_write)(u8 * u16);
#if GTP_ESD_PROTECT
extern void gtp_esd_switch(struct i2c_client * s32);
#endif
s32 DATA_LENGTH = 0;
s8 IC_TYPE[16] = “GT9XX“;
static void tool_set_proc_name(char * procname
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 17972 2014-01-14 12:38 Reference Drivers\goodix_tool.c
文件 79667 2014-01-14 16:31 Reference Drivers\gt9xx.c
文件 11279 2014-01-14 12:47 Reference Drivers\gt9xx.h
文件 217370 2013-08-27 20:59 Reference Drivers\GT9XXF Firmware Headers\GT910\gt9xx_firmware.h
文件 217370 2013-10-24 14:29 Reference Drivers\GT9XXF Firmware Headers\GT912\gt9xx_firmware.h
文件 217371 2013-10-24 14:40 Reference Drivers\GT9XXF Firmware Headers\GT9150\gt9xx_firmware.h
文件 217370 2013-10-24 14:20 Reference Drivers\GT9XXF Firmware Headers\GT950\gt9xx_firmware.h
文件 217371 2013-10-30 08:59 Reference Drivers\GT9XXF Firmware Headers\GT960F\gt9xx_firmware.h
文件 217370 2013-10-31 09:27 Reference Drivers\GT9XXF Firmware Headers\GT963\gt9xx_firmware.h
文件 217371 2013-08-27 21:00 Reference Drivers\GT9XXF Firmware Headers\GT968F\gt9xx_firmware.h
文件 592 2013-08-28 20:33 Reference Drivers\GT9XXF Firmware Headers\readme.txt
文件 217374 2013-08-28 20:09 Reference Drivers\gt9xx_firmware.h
文件 105304 2014-01-14 17:30 Reference Drivers\gt9xx_update.c
目录 0 2014-01-14 12:48 Reference Drivers\GT9XXF Firmware Headers\GT910
目录 0 2014-01-14 12:48 Reference Drivers\GT9XXF Firmware Headers\GT912
目录 0 2014-01-14 12:48 Reference Drivers\GT9XXF Firmware Headers\GT9150
目录 0 2014-01-14 12:48 Reference Drivers\GT9XXF Firmware Headers\GT950
目录 0 2014-01-14 12:48 Reference Drivers\GT9XXF Firmware Headers\GT960F
目录 0 2014-01-14 12:48 Reference Drivers\GT9XXF Firmware Headers\GT963
目录 0 2014-01-14 12:48 Reference Drivers\GT9XXF Firmware Headers\GT968F
目录 0 2014-01-14 12:48 Reference Drivers\GT9XXF Firmware Headers
目录 0 2014-01-14 12:49 Reference Drivers
----------- --------- ---------- ----- ----
1953781 22
评论
共有 条评论