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

Go to the source code of this file.

Data Structures

struct  kxtj9_data
 

Macros

#define NAME   "kxtj9"
 
#define G_MAX   8000
 
#define XOUT_L   0x06
 
#define WHO_AM_I   0x0F
 
#define INT_REL   0x1A
 
#define CTRL_REG1   0x1B
 
#define INT_CTRL1   0x1E
 
#define DATA_CTRL   0x21
 
#define PC1_OFF   0x7F
 
#define PC1_ON   (1 << 7)
 
#define DRDYE   (1 << 5)
 
#define ODR12_5F   0
 
#define ODR25F   1
 
#define ODR50F   2
 
#define ODR100F   3
 
#define ODR200F   4
 
#define ODR400F   5
 
#define ODR800F   6
 
#define KXTJ9_IEL   (1 << 3)
 
#define KXTJ9_IEA   (1 << 4)
 
#define KXTJ9_IEN   (1 << 5)
 
#define FUZZ   3
 
#define FLAT   3
 
#define RES_DATA_CTRL   0
 
#define RES_CTRL_REG1   1
 
#define RES_INT_CTRL1   2
 
#define RESUME_ENTRIES   3
 

Functions

 MODULE_DEVICE_TABLE (i2c, kxtj9_id)
 
 module_i2c_driver (kxtj9_driver)
 
 MODULE_DESCRIPTION ("KXTJ9 accelerometer driver")
 
 MODULE_AUTHOR ("Chris Hudson <[email protected]>")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define CTRL_REG1   0x1B

Definition at line 36 of file kxtj9.c.

#define DATA_CTRL   0x21

Definition at line 38 of file kxtj9.c.

#define DRDYE   (1 << 5)

Definition at line 43 of file kxtj9.c.

#define FLAT   3

Definition at line 59 of file kxtj9.c.

#define FUZZ   3

Definition at line 58 of file kxtj9.c.

#define G_MAX   8000

Definition at line 30 of file kxtj9.c.

#define INT_CTRL1   0x1E

Definition at line 37 of file kxtj9.c.

#define INT_REL   0x1A

Definition at line 35 of file kxtj9.c.

#define KXTJ9_IEA   (1 << 4)

Definition at line 55 of file kxtj9.c.

#define KXTJ9_IEL   (1 << 3)

Definition at line 54 of file kxtj9.c.

#define KXTJ9_IEN   (1 << 5)

Definition at line 56 of file kxtj9.c.

#define NAME   "kxtj9"

Definition at line 29 of file kxtj9.c.

#define ODR100F   3

Definition at line 48 of file kxtj9.c.

#define ODR12_5F   0

Definition at line 45 of file kxtj9.c.

#define ODR200F   4

Definition at line 49 of file kxtj9.c.

#define ODR25F   1

Definition at line 46 of file kxtj9.c.

#define ODR400F   5

Definition at line 50 of file kxtj9.c.

#define ODR50F   2

Definition at line 47 of file kxtj9.c.

#define ODR800F   6

Definition at line 51 of file kxtj9.c.

#define PC1_OFF   0x7F

Definition at line 40 of file kxtj9.c.

#define PC1_ON   (1 << 7)

Definition at line 41 of file kxtj9.c.

#define RES_CTRL_REG1   1

Definition at line 62 of file kxtj9.c.

#define RES_DATA_CTRL   0

Definition at line 61 of file kxtj9.c.

#define RES_INT_CTRL1   2

Definition at line 63 of file kxtj9.c.

#define RESUME_ENTRIES   3

Definition at line 64 of file kxtj9.c.

#define WHO_AM_I   0x0F

Definition at line 33 of file kxtj9.c.

#define XOUT_L   0x06

Definition at line 32 of file kxtj9.c.

Function Documentation

MODULE_AUTHOR ( "Chris Hudson <[email protected]>"  )
MODULE_DESCRIPTION ( "KXTJ9 accelerometer driver )
MODULE_DEVICE_TABLE ( i2c  ,
kxtj9_id   
)
module_i2c_driver ( kxtj9_driver  )
MODULE_LICENSE ( "GPL"  )

Variable Documentation

unsigned int cutoff

Definition at line 71 of file kxtj9.c.

u8 mask

Definition at line 72 of file kxtj9.c.