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

Go to the source code of this file.

Data Structures

struct  ad714x_slider_drv
 
struct  ad714x_wheel_drv
 
struct  ad714x_touchpad_drv
 
struct  ad714x_button_drv
 
struct  ad714x_driver_data
 

Macros

#define AD714X_PWR_CTRL   0x0
 
#define AD714X_STG_CAL_EN_REG   0x1
 
#define AD714X_AMB_COMP_CTRL0_REG   0x2
 
#define AD714X_PARTID_REG   0x17
 
#define AD7142_PARTID   0xE620
 
#define AD7143_PARTID   0xE630
 
#define AD7147_PARTID   0x1470
 
#define AD7148_PARTID   0x1480
 
#define AD714X_STAGECFG_REG   0x80
 
#define AD714X_SYSCFG_REG   0x0
 
#define STG_LOW_INT_EN_REG   0x5
 
#define STG_HIGH_INT_EN_REG   0x6
 
#define STG_COM_INT_EN_REG   0x7
 
#define STG_LOW_INT_STA_REG   0x8
 
#define STG_HIGH_INT_STA_REG   0x9
 
#define STG_COM_INT_STA_REG   0xA
 
#define CDC_RESULT_S0   0xB
 
#define CDC_RESULT_S1   0xC
 
#define CDC_RESULT_S2   0xD
 
#define CDC_RESULT_S3   0xE
 
#define CDC_RESULT_S4   0xF
 
#define CDC_RESULT_S5   0x10
 
#define CDC_RESULT_S6   0x11
 
#define CDC_RESULT_S7   0x12
 
#define CDC_RESULT_S8   0x13
 
#define CDC_RESULT_S9   0x14
 
#define CDC_RESULT_S10   0x15
 
#define CDC_RESULT_S11   0x16
 
#define STAGE0_AMBIENT   0xF1
 
#define STAGE1_AMBIENT   0x115
 
#define STAGE2_AMBIENT   0x139
 
#define STAGE3_AMBIENT   0x15D
 
#define STAGE4_AMBIENT   0x181
 
#define STAGE5_AMBIENT   0x1A5
 
#define STAGE6_AMBIENT   0x1C9
 
#define STAGE7_AMBIENT   0x1ED
 
#define STAGE8_AMBIENT   0x211
 
#define STAGE9_AMBIENT   0x234
 
#define STAGE10_AMBIENT   0x259
 
#define STAGE11_AMBIENT   0x27D
 
#define PER_STAGE_REG_NUM   36
 
#define STAGE_CFGREG_NUM   8
 
#define SYS_CFGREG_NUM   8
 
#define LEFT_END_POINT_DETECTION_LEVEL   550
 
#define RIGHT_END_POINT_DETECTION_LEVEL   750
 
#define LEFT_RIGHT_END_POINT_DEAVTIVALION_LEVEL   850
 
#define TOP_END_POINT_DETECTION_LEVEL   550
 
#define BOTTOM_END_POINT_DETECTION_LEVEL   950
 
#define TOP_BOTTOM_END_POINT_DEAVTIVALION_LEVEL   700
 
#define MAX_DEVICE_NUM   8
 

Enumerations

enum  ad714x_device_state { IDLE, JITTER, ACTIVE, SPACE }
 

Functions

struct ad714x_chipad714x_probe (struct device *dev, u16 bus_type, int irq, ad714x_read_t read, ad714x_write_t write)
 
 EXPORT_SYMBOL (ad714x_probe)
 
void ad714x_remove (struct ad714x_chip *ad714x)
 
 EXPORT_SYMBOL (ad714x_remove)
 
 MODULE_DESCRIPTION ("Analog Devices AD714X Capacitance Touch Sensor Driver")
 
 MODULE_AUTHOR ("Barry Song <[email protected]>")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define AD7142_PARTID   0xE620

Definition at line 22 of file ad714x.c.

#define AD7143_PARTID   0xE630

Definition at line 23 of file ad714x.c.

#define AD7147_PARTID   0x1470

Definition at line 24 of file ad714x.c.

#define AD7148_PARTID   0x1480

Definition at line 25 of file ad714x.c.

#define AD714X_AMB_COMP_CTRL0_REG   0x2

Definition at line 20 of file ad714x.c.

#define AD714X_PARTID_REG   0x17

Definition at line 21 of file ad714x.c.

#define AD714X_PWR_CTRL   0x0

Definition at line 18 of file ad714x.c.

#define AD714X_STAGECFG_REG   0x80

Definition at line 26 of file ad714x.c.

#define AD714X_STG_CAL_EN_REG   0x1

Definition at line 19 of file ad714x.c.

#define AD714X_SYSCFG_REG   0x0

Definition at line 27 of file ad714x.c.

#define BOTTOM_END_POINT_DETECTION_LEVEL   950

Definition at line 699 of file ad714x.c.

#define CDC_RESULT_S0   0xB

Definition at line 36 of file ad714x.c.

#define CDC_RESULT_S1   0xC

Definition at line 37 of file ad714x.c.

#define CDC_RESULT_S10   0x15

Definition at line 46 of file ad714x.c.

#define CDC_RESULT_S11   0x16

Definition at line 47 of file ad714x.c.

#define CDC_RESULT_S2   0xD

Definition at line 38 of file ad714x.c.

#define CDC_RESULT_S3   0xE

Definition at line 39 of file ad714x.c.

#define CDC_RESULT_S4   0xF

Definition at line 40 of file ad714x.c.

#define CDC_RESULT_S5   0x10

Definition at line 41 of file ad714x.c.

#define CDC_RESULT_S6   0x11

Definition at line 42 of file ad714x.c.

#define CDC_RESULT_S7   0x12

Definition at line 43 of file ad714x.c.

#define CDC_RESULT_S8   0x13

Definition at line 44 of file ad714x.c.

#define CDC_RESULT_S9   0x14

Definition at line 45 of file ad714x.c.

#define LEFT_END_POINT_DETECTION_LEVEL   550

Definition at line 695 of file ad714x.c.

#define LEFT_RIGHT_END_POINT_DEAVTIVALION_LEVEL   850

Definition at line 697 of file ad714x.c.

#define MAX_DEVICE_NUM   8

Definition at line 964 of file ad714x.c.

#define PER_STAGE_REG_NUM   36

Definition at line 62 of file ad714x.c.

#define RIGHT_END_POINT_DETECTION_LEVEL   750

Definition at line 696 of file ad714x.c.

#define STAGE0_AMBIENT   0xF1

Definition at line 49 of file ad714x.c.

#define STAGE10_AMBIENT   0x259

Definition at line 59 of file ad714x.c.

#define STAGE11_AMBIENT   0x27D

Definition at line 60 of file ad714x.c.

#define STAGE1_AMBIENT   0x115

Definition at line 50 of file ad714x.c.

#define STAGE2_AMBIENT   0x139

Definition at line 51 of file ad714x.c.

#define STAGE3_AMBIENT   0x15D

Definition at line 52 of file ad714x.c.

#define STAGE4_AMBIENT   0x181

Definition at line 53 of file ad714x.c.

#define STAGE5_AMBIENT   0x1A5

Definition at line 54 of file ad714x.c.

#define STAGE6_AMBIENT   0x1C9

Definition at line 55 of file ad714x.c.

#define STAGE7_AMBIENT   0x1ED

Definition at line 56 of file ad714x.c.

#define STAGE8_AMBIENT   0x211

Definition at line 57 of file ad714x.c.

#define STAGE9_AMBIENT   0x234

Definition at line 58 of file ad714x.c.

#define STAGE_CFGREG_NUM   8

Definition at line 63 of file ad714x.c.

#define STG_COM_INT_EN_REG   0x7

Definition at line 31 of file ad714x.c.

#define STG_COM_INT_STA_REG   0xA

Definition at line 34 of file ad714x.c.

#define STG_HIGH_INT_EN_REG   0x6

Definition at line 30 of file ad714x.c.

#define STG_HIGH_INT_STA_REG   0x9

Definition at line 33 of file ad714x.c.

#define STG_LOW_INT_EN_REG   0x5

Definition at line 29 of file ad714x.c.

#define STG_LOW_INT_STA_REG   0x8

Definition at line 32 of file ad714x.c.

#define SYS_CFGREG_NUM   8

Definition at line 64 of file ad714x.c.

#define TOP_BOTTOM_END_POINT_DEAVTIVALION_LEVEL   700

Definition at line 700 of file ad714x.c.

#define TOP_END_POINT_DETECTION_LEVEL   550

Definition at line 698 of file ad714x.c.

Enumeration Type Documentation

Enumerator:
IDLE 
JITTER 
ACTIVE 
SPACE 

Definition at line 69 of file ad714x.c.

Function Documentation

struct ad714x_chip* ad714x_probe ( struct device dev,
u16  bus_type,
int  irq,
ad714x_read_t  read,
ad714x_write_t  write 
)
read

Definition at line 965 of file ad714x.c.

void ad714x_remove ( struct ad714x_chip ad714x)

Definition at line 1191 of file ad714x.c.

EXPORT_SYMBOL ( ad714x_probe  )
EXPORT_SYMBOL ( ad714x_remove  )
MODULE_AUTHOR ( "Barry Song <[email protected]>"  )
MODULE_DESCRIPTION ( "Analog Devices AD714X Capacitance Touch Sensor Driver"  )
MODULE_LICENSE ( "GPL"  )