Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
edt-ft5x06.c File Reference
#include <linux/module.h>
#include <linux/ratelimit.h>
#include <linux/interrupt.h>
#include <linux/input.h>
#include <linux/i2c.h>
#include <linux/uaccess.h>
#include <linux/delay.h>
#include <linux/debugfs.h>
#include <linux/slab.h>
#include <linux/gpio.h>
#include <linux/input/mt.h>
#include <linux/input/edt-ft5x06.h>

Go to the source code of this file.

Data Structures

struct  edt_ft5x06_ts_data
 
struct  edt_ft5x06_attribute
 

Macros

#define MAX_SUPPORT_POINTS   5
 
#define WORK_REGISTER_THRESHOLD   0x00
 
#define WORK_REGISTER_REPORT_RATE   0x08
 
#define WORK_REGISTER_GAIN   0x30
 
#define WORK_REGISTER_OFFSET   0x31
 
#define WORK_REGISTER_NUM_X   0x33
 
#define WORK_REGISTER_NUM_Y   0x34
 
#define WORK_REGISTER_OPMODE   0x3c
 
#define FACTORY_REGISTER_OPMODE   0x01
 
#define TOUCH_EVENT_DOWN   0x00
 
#define TOUCH_EVENT_UP   0x01
 
#define TOUCH_EVENT_ON   0x02
 
#define TOUCH_EVENT_RESERVED   0x03
 
#define EDT_NAME_LEN   23
 
#define EDT_SWITCH_MODE_RETRIES   10
 
#define EDT_SWITCH_MODE_DELAY   5 /* msec */
 
#define EDT_RAW_DATA_RETRIES   100
 
#define EDT_RAW_DATA_DELAY   1 /* msec */
 
#define EDT_ATTR(_field, _mode, _addr, _limit_low, _limit_high)
 
#define EDT_ATTR_CHECKSET(name, reg)
 

Functions

 MODULE_DEVICE_TABLE (i2c, edt_ft5x06_ts_id)
 
 module_i2c_driver (edt_ft5x06_ts_driver)
 
 MODULE_AUTHOR ("Simon Budig <[email protected]>")
 
 MODULE_DESCRIPTION ("EDT FT5x06 I2C Touchscreen Driver")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define EDT_ATTR (   _field,
  _mode,
  _addr,
  _limit_low,
  _limit_high 
)
Value:
struct edt_ft5x06_attribute edt_ft5x06_attr_##_field = { \
.dattr = __ATTR(_field, _mode, \
edt_ft5x06_setting_show, \
edt_ft5x06_setting_store), \
.field_offset = \
offsetof(struct edt_ft5x06_ts_data, _field), \
.limit_low = _limit_low, \
.limit_high = _limit_high, \
.addr = _addr, \
}

Definition at line 240 of file edt-ft5x06.c.

#define EDT_ATTR_CHECKSET (   name,
  reg 
)
Value:
if (pdata->name >= edt_ft5x06_attr_##name.limit_low && \
pdata->name <= edt_ft5x06_attr_##name.limit_high) \
edt_ft5x06_register_write(tsdata, reg, pdata->name)

Definition at line 681 of file edt-ft5x06.c.

#define EDT_NAME_LEN   23

Definition at line 56 of file edt-ft5x06.c.

#define EDT_RAW_DATA_DELAY   1 /* msec */

Definition at line 60 of file edt-ft5x06.c.

#define EDT_RAW_DATA_RETRIES   100

Definition at line 59 of file edt-ft5x06.c.

#define EDT_SWITCH_MODE_DELAY   5 /* msec */

Definition at line 58 of file edt-ft5x06.c.

#define EDT_SWITCH_MODE_RETRIES   10

Definition at line 57 of file edt-ft5x06.c.

#define FACTORY_REGISTER_OPMODE   0x01

Definition at line 49 of file edt-ft5x06.c.

#define MAX_SUPPORT_POINTS   5

Definition at line 39 of file edt-ft5x06.c.

#define TOUCH_EVENT_DOWN   0x00

Definition at line 51 of file edt-ft5x06.c.

#define TOUCH_EVENT_ON   0x02

Definition at line 53 of file edt-ft5x06.c.

#define TOUCH_EVENT_RESERVED   0x03

Definition at line 54 of file edt-ft5x06.c.

#define TOUCH_EVENT_UP   0x01

Definition at line 52 of file edt-ft5x06.c.

#define WORK_REGISTER_GAIN   0x30

Definition at line 43 of file edt-ft5x06.c.

#define WORK_REGISTER_NUM_X   0x33

Definition at line 45 of file edt-ft5x06.c.

#define WORK_REGISTER_NUM_Y   0x34

Definition at line 46 of file edt-ft5x06.c.

#define WORK_REGISTER_OFFSET   0x31

Definition at line 44 of file edt-ft5x06.c.

#define WORK_REGISTER_OPMODE   0x3c

Definition at line 48 of file edt-ft5x06.c.

#define WORK_REGISTER_REPORT_RATE   0x08

Definition at line 42 of file edt-ft5x06.c.

#define WORK_REGISTER_THRESHOLD   0x00

Definition at line 41 of file edt-ft5x06.c.

Function Documentation

MODULE_AUTHOR ( "Simon Budig <[email protected]>"  )
MODULE_DESCRIPTION ( "EDT FT5x06 I2C Touchscreen Driver"  )
MODULE_DEVICE_TABLE ( i2c  ,
edt_ft5x06_ts_id   
)
module_i2c_driver ( edt_ft5x06_ts_driver  )
MODULE_LICENSE ( "GPL"  )