#include <linux/module.h>
#include <linux/i2c.h>
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
#include <linux/byteorder/generic.h>
#define DMARD10_REG_ACTR …
#define DMARD10_REG_AFEM …
#define DMARD10_REG_STADR …
#define DMARD10_REG_STAINT …
#define DMARD10_REG_MISC2 …
#define DMARD10_REG_PD …
#define DMARD10_MODE_OFF …
#define DMARD10_MODE_STANDBY …
#define DMARD10_MODE_ACTIVE …
#define DMARD10_MODE_READ_OTP …
#define DMARD10_MODE_RESET_DATA_PATH …
#define DMARD10_VALUE_AFEM_AFEN_NORMAL …
#define DMARD10_VALUE_CKSEL_ODR_100_204 …
#define DMARD10_VALUE_INTC …
#define DMARD10_VALUE_TAPNS_AVE_2 …
#define DMARD10_VALUE_STADR …
#define DMARD10_VALUE_STAINT …
#define DMARD10_VALUE_MISC2_OSCA_EN …
#define DMARD10_VALUE_PD_RST …
#define DMARD10_X_OFFSET …
#define DMARD10_Y_OFFSET …
#define DMARD10_Z_OFFSET …
static const int dmard10_nscale = …;
#define DMARD10_CHANNEL(reg, axis) …
static const struct iio_chan_spec dmard10_channels[] = …;
struct dmard10_data { … };
static int dmard10_reset(struct i2c_client *client)
{ … }
static int dmard10_shutdown(struct i2c_client *client)
{ … }
static int dmard10_read_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
int *val, int *val2, long mask)
{ … }
static const struct iio_info dmard10_info = …;
static void dmard10_shutdown_cleanup(void *client)
{ … }
static int dmard10_probe(struct i2c_client *client)
{ … }
static int dmard10_suspend(struct device *dev)
{ … }
static int dmard10_resume(struct device *dev)
{ … }
static DEFINE_SIMPLE_DEV_PM_OPS(dmard10_pm_ops, dmard10_suspend,
dmard10_resume);
static const struct i2c_device_id dmard10_i2c_id[] = …;
MODULE_DEVICE_TABLE(i2c, dmard10_i2c_id);
static struct i2c_driver dmard10_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;