#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/i2c.h>
#include <linux/err.h>
#include <linux/mutex.h>
#include <linux/delay.h>
#include <linux/gpio.h>
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
Go to the source code of this file.
#define AK8975_CHANNEL |
( |
|
axis, |
|
|
|
index |
|
) |
| |
Value:{ \
.modified = 1, \
.channel2 = IIO_MOD_##axis, \
IIO_CHAN_INFO_SCALE_SEPARATE_BIT, \
}
Definition at line 393 of file ak8975.c.
#define AK8975_CONVERSION_DONE_POLL_TIME 10 |
#define AK8975_DEVICE_ID 0x48 |
#define AK8975_MAX_CONVERSION_TIMEOUT 500 |
#define AK8975_REG_ASAX 0x10 |
#define AK8975_REG_ASAY 0x11 |
#define AK8975_REG_ASAZ 0x12 |
#define AK8975_REG_ASTC 0x0C |
#define AK8975_REG_CNTL 0x0A |
#define AK8975_REG_CNTL_MODE_FUSE_ROM 0xF |
#define AK8975_REG_CNTL_MODE_MASK (0xF << AK8975_REG_CNTL_MODE_SHIFT) |
#define AK8975_REG_CNTL_MODE_ONCE 1 |
#define AK8975_REG_CNTL_MODE_POWER_DOWN 0 |
#define AK8975_REG_CNTL_MODE_SELF_TEST 8 |
#define AK8975_REG_CNTL_MODE_SHIFT 0 |
#define AK8975_REG_HXH 0x04 |
#define AK8975_REG_HXL 0x03 |
#define AK8975_REG_HYH 0x06 |
#define AK8975_REG_HYL 0x05 |
#define AK8975_REG_HZH 0x08 |
#define AK8975_REG_HZL 0x07 |
#define AK8975_REG_I2CDIS 0x0F |
#define AK8975_REG_INFO 0x01 |
#define AK8975_REG_RSVC 0x0B |
#define AK8975_REG_ST1 0x02 |
#define AK8975_REG_ST1_DRDY_SHIFT 0 |
#define AK8975_REG_ST2 0x09 |
#define AK8975_REG_ST2_DERR_SHIFT 2 |
#define AK8975_REG_ST2_HOFL_SHIFT 3 |
#define AK8975_REG_TS1 0x0D |
#define AK8975_REG_TS2 0x0E |
#define AK8975_REG_WIA 0x00 |
MODULE_DESCRIPTION |
( |
"AK8975 magnetometer driver" |
| ) |
|
MODULE_DEVICE_TABLE |
( |
i2c |
, |
|
|
ak8975_id |
|
|
) |
| |
MODULE_DEVICE_TABLE |
( |
of |
, |
|
|
ak8975_of_match |
|
|
) |
| |
module_i2c_driver |
( |
ak8975_driver |
| ) |
|