/*
* KMX61 - Kionix 6-axis Accelerometer/Magnetometer
*
* Copyright (c) 2014, Intel Corporation.
*
* This file is subject to the terms and conditions of version 2 of
* the GNU General Public License. See the file COPYING in the main
* directory of this archive for more details.
*
* IIO driver for KMX61 (7-bit I2C slave address 0x0E or 0x0F).
*
*/
#include <linux/module.h>
#include <linux/i2c.h>
#include <linux/acpi.h>
#include <linux/interrupt.h>
#include <linux/pm.h>
#include <linux/pm_runtime.h>
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
#include <linux/iio/events.h>
#include <linux/iio/trigger.h>
#include <linux/iio/buffer.h>
#include <linux/iio/triggered_buffer.h>
#include <linux/iio/trigger_consumer.h>
#define KMX61_DRV_NAME "kmx61"
#define KMX61_IRQ_NAME "kmx61_event"
#define KMX61_REG_WHO_AM_I 0x00
#define KMX61_REG_INS1 0x01
#define KMX61_REG_INS2 0x02
/*
* three 16-bit accelerometer output registers for X/Y/Z axis
* we use only XOUT_L as a base register, all other addresses
* can be obtained by applying an offset and are provided here
* only for clarity.
*/
#define KMX61_ACC_XOUT_L 0x0A
#define KMX61_ACC_XOUT_H 0x0B
#define KMX61_ACC_YOUT_L 0x0C
#define KMX61_ACC_YOUT_H 0x0D