#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.
| #define MMA8450_CTRL_REG1 0x38 |
| #define MMA8450_CTRL_REG2 0x39 |
| #define MMA8450_DRV_NAME "mma8450" |
| #define MMA8450_OUT_X8 0x01 |
| #define MMA8450_OUT_X_LSB 0x05 |
| #define MMA8450_OUT_X_MSB 0x06 |
| #define MMA8450_OUT_Y8 0x02 |
| #define MMA8450_OUT_Y_LSB 0x07 |
| #define MMA8450_OUT_Y_MSB 0x08 |
| #define MMA8450_OUT_Z8 0x03 |
| #define MMA8450_OUT_Z_LSB 0x09 |
| #define MMA8450_OUT_Z_MSB 0x0a |
| #define MMA8450_STATUS 0x00 |
| #define MMA8450_STATUS_ZXYDR 0x08 |
| #define MMA8450_XYZ_DATA_CFG 0x16 |
| #define MODE_CHANGE_DELAY_MS 100 |
| #define POLL_INTERVAL 100 |
| #define POLL_INTERVAL_MAX 500 |
| 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 |
| ) |
|