Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
tsc2007.c File Reference
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/input.h>
#include <linux/interrupt.h>
#include <linux/i2c.h>
#include <linux/i2c/tsc2007.h>

Go to the source code of this file.

Data Structures

struct  ts_event
 
struct  tsc2007
 

Macros

#define TSC2007_MEASURE_TEMP0   (0x0 << 4)
 
#define TSC2007_MEASURE_AUX   (0x2 << 4)
 
#define TSC2007_MEASURE_TEMP1   (0x4 << 4)
 
#define TSC2007_ACTIVATE_XN   (0x8 << 4)
 
#define TSC2007_ACTIVATE_YN   (0x9 << 4)
 
#define TSC2007_ACTIVATE_YP_XN   (0xa << 4)
 
#define TSC2007_SETUP   (0xb << 4)
 
#define TSC2007_MEASURE_X   (0xc << 4)
 
#define TSC2007_MEASURE_Y   (0xd << 4)
 
#define TSC2007_MEASURE_Z1   (0xe << 4)
 
#define TSC2007_MEASURE_Z2   (0xf << 4)
 
#define TSC2007_POWER_OFF_IRQ_EN   (0x0 << 2)
 
#define TSC2007_ADC_ON_IRQ_DIS0   (0x1 << 2)
 
#define TSC2007_ADC_OFF_IRQ_EN   (0x2 << 2)
 
#define TSC2007_ADC_ON_IRQ_DIS1   (0x3 << 2)
 
#define TSC2007_12BIT   (0x0 << 1)
 
#define TSC2007_8BIT   (0x1 << 1)
 
#define MAX_12BIT   ((1 << 12) - 1)
 
#define ADC_ON_12BIT   (TSC2007_12BIT | TSC2007_ADC_ON_IRQ_DIS0)
 
#define READ_Y   (ADC_ON_12BIT | TSC2007_MEASURE_Y)
 
#define READ_Z1   (ADC_ON_12BIT | TSC2007_MEASURE_Z1)
 
#define READ_Z2   (ADC_ON_12BIT | TSC2007_MEASURE_Z2)
 
#define READ_X   (ADC_ON_12BIT | TSC2007_MEASURE_X)
 
#define PWRDOWN   (TSC2007_12BIT | TSC2007_POWER_OFF_IRQ_EN)
 

Functions

 MODULE_DEVICE_TABLE (i2c, tsc2007_idtable)
 
 module_i2c_driver (tsc2007_driver)
 
 MODULE_AUTHOR ("Kwangwoo Lee <[email protected]>")
 
 MODULE_DESCRIPTION ("TSC2007 TouchScreen Driver")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define ADC_ON_12BIT   (TSC2007_12BIT | TSC2007_ADC_ON_IRQ_DIS0)

Definition at line 52 of file tsc2007.c.

#define MAX_12BIT   ((1 << 12) - 1)

Definition at line 50 of file tsc2007.c.

#define PWRDOWN   (TSC2007_12BIT | TSC2007_POWER_OFF_IRQ_EN)

Definition at line 58 of file tsc2007.c.

#define READ_X   (ADC_ON_12BIT | TSC2007_MEASURE_X)

Definition at line 57 of file tsc2007.c.

#define READ_Y   (ADC_ON_12BIT | TSC2007_MEASURE_Y)

Definition at line 54 of file tsc2007.c.

#define READ_Z1   (ADC_ON_12BIT | TSC2007_MEASURE_Z1)

Definition at line 55 of file tsc2007.c.

#define READ_Z2   (ADC_ON_12BIT | TSC2007_MEASURE_Z2)

Definition at line 56 of file tsc2007.c.

#define TSC2007_12BIT   (0x0 << 1)

Definition at line 47 of file tsc2007.c.

#define TSC2007_8BIT   (0x1 << 1)

Definition at line 48 of file tsc2007.c.

#define TSC2007_ACTIVATE_XN   (0x8 << 4)

Definition at line 33 of file tsc2007.c.

#define TSC2007_ACTIVATE_YN   (0x9 << 4)

Definition at line 34 of file tsc2007.c.

#define TSC2007_ACTIVATE_YP_XN   (0xa << 4)

Definition at line 35 of file tsc2007.c.

#define TSC2007_ADC_OFF_IRQ_EN   (0x2 << 2)

Definition at line 44 of file tsc2007.c.

#define TSC2007_ADC_ON_IRQ_DIS0   (0x1 << 2)

Definition at line 43 of file tsc2007.c.

#define TSC2007_ADC_ON_IRQ_DIS1   (0x3 << 2)

Definition at line 45 of file tsc2007.c.

#define TSC2007_MEASURE_AUX   (0x2 << 4)

Definition at line 31 of file tsc2007.c.

#define TSC2007_MEASURE_TEMP0   (0x0 << 4)

Definition at line 30 of file tsc2007.c.

#define TSC2007_MEASURE_TEMP1   (0x4 << 4)

Definition at line 32 of file tsc2007.c.

#define TSC2007_MEASURE_X   (0xc << 4)

Definition at line 37 of file tsc2007.c.

#define TSC2007_MEASURE_Y   (0xd << 4)

Definition at line 38 of file tsc2007.c.

#define TSC2007_MEASURE_Z1   (0xe << 4)

Definition at line 39 of file tsc2007.c.

#define TSC2007_MEASURE_Z2   (0xf << 4)

Definition at line 40 of file tsc2007.c.

#define TSC2007_POWER_OFF_IRQ_EN   (0x0 << 2)

Definition at line 42 of file tsc2007.c.

#define TSC2007_SETUP   (0xb << 4)

Definition at line 36 of file tsc2007.c.

Function Documentation

MODULE_AUTHOR ( "Kwangwoo Lee <[email protected]>"  )
MODULE_DESCRIPTION ( "TSC2007 TouchScreen Driver"  )
MODULE_DEVICE_TABLE ( i2c  ,
tsc2007_idtable   
)
module_i2c_driver ( tsc2007_driver  )
MODULE_LICENSE ( "GPL"  )