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

Go to the source code of this file.

Data Structures

struct  mma8450
 

Macros

#define MMA8450_DRV_NAME   "mma8450"
 
#define MODE_CHANGE_DELAY_MS   100
 
#define POLL_INTERVAL   100
 
#define POLL_INTERVAL_MAX   500
 
#define MMA8450_STATUS   0x00
 
#define MMA8450_STATUS_ZXYDR   0x08
 
#define MMA8450_OUT_X8   0x01
 
#define MMA8450_OUT_Y8   0x02
 
#define MMA8450_OUT_Z8   0x03
 
#define MMA8450_OUT_X_LSB   0x05
 
#define MMA8450_OUT_X_MSB   0x06
 
#define MMA8450_OUT_Y_LSB   0x07
 
#define MMA8450_OUT_Y_MSB   0x08
 
#define MMA8450_OUT_Z_LSB   0x09
 
#define MMA8450_OUT_Z_MSB   0x0a
 
#define MMA8450_XYZ_DATA_CFG   0x16
 
#define MMA8450_CTRL_REG1   0x38
 
#define MMA8450_CTRL_REG2   0x39
 

Functions

 MODULE_DEVICE_TABLE (i2c, mma8450_id)
 
 MODULE_DEVICE_TABLE (of, mma8450_dt_ids)
 
 module_i2c_driver (mma8450_driver)
 
 MODULE_AUTHOR ("Freescale Semiconductor, Inc.")
 
 MODULE_DESCRIPTION ("MMA8450 3-Axis Accelerometer Driver")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define MMA8450_CTRL_REG1   0x38

Definition at line 52 of file mma8450.c.

#define MMA8450_CTRL_REG2   0x39

Definition at line 53 of file mma8450.c.

#define MMA8450_DRV_NAME   "mma8450"

Definition at line 29 of file mma8450.c.

#define MMA8450_OUT_X8   0x01

Definition at line 39 of file mma8450.c.

#define MMA8450_OUT_X_LSB   0x05

Definition at line 43 of file mma8450.c.

#define MMA8450_OUT_X_MSB   0x06

Definition at line 44 of file mma8450.c.

#define MMA8450_OUT_Y8   0x02

Definition at line 40 of file mma8450.c.

#define MMA8450_OUT_Y_LSB   0x07

Definition at line 45 of file mma8450.c.

#define MMA8450_OUT_Y_MSB   0x08

Definition at line 46 of file mma8450.c.

#define MMA8450_OUT_Z8   0x03

Definition at line 41 of file mma8450.c.

#define MMA8450_OUT_Z_LSB   0x09

Definition at line 47 of file mma8450.c.

#define MMA8450_OUT_Z_MSB   0x0a

Definition at line 48 of file mma8450.c.

#define MMA8450_STATUS   0x00

Definition at line 36 of file mma8450.c.

#define MMA8450_STATUS_ZXYDR   0x08

Definition at line 37 of file mma8450.c.

#define MMA8450_XYZ_DATA_CFG   0x16

Definition at line 50 of file mma8450.c.

#define MODE_CHANGE_DELAY_MS   100

Definition at line 31 of file mma8450.c.

#define POLL_INTERVAL   100

Definition at line 32 of file mma8450.c.

#define POLL_INTERVAL_MAX   500

Definition at line 33 of file mma8450.c.

Function Documentation

MODULE_AUTHOR ( "Freescale  Semiconductor,
Inc."   
)
MODULE_DESCRIPTION ( "MMA8450 3-Axis Accelerometer Driver"  )
MODULE_DEVICE_TABLE ( i2c  ,
mma8450_id   
)
MODULE_DEVICE_TABLE ( of  ,
mma8450_dt_ids   
)
module_i2c_driver ( mma8450_driver  )
MODULE_LICENSE ( "GPL"  )