#include <linux/delay.h>
#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/module.h>
#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <linux/regulator/consumer.h>
#include <linux/iio/iio.h>
#include <linux/iio/trigger_consumer.h>
#include <linux/iio/triggered_buffer.h>
#define AF8133J_REG_OUT …
#define AF8133J_REG_PCODE …
#define AF8133J_REG_PCODE_VAL …
#define AF8133J_REG_STATUS …
#define AF8133J_REG_STATUS_ACQ …
#define AF8133J_REG_STATE …
#define AF8133J_REG_STATE_STBY …
#define AF8133J_REG_STATE_WORK …
#define AF8133J_REG_RANGE …
#define AF8133J_REG_RANGE_22G …
#define AF8133J_REG_RANGE_12G …
#define AF8133J_REG_SWR …
#define AF8133J_REG_SWR_PERFORM …
static const char * const af8133j_supply_names[] = …;
struct af8133j_data { … };
enum af8133j_axis { … };
static struct iio_mount_matrix *
af8133j_get_mount_matrix(struct iio_dev *indio_dev,
const struct iio_chan_spec *chan)
{ … }
static const struct iio_chan_spec_ext_info af8133j_ext_info[] = …;
#define AF8133J_CHANNEL(_si, _axis) …
static const struct iio_chan_spec af8133j_channels[] = …;
static int af8133j_product_check(struct af8133j_data *data)
{ … }
static int af8133j_reset(struct af8133j_data *data)
{ … }
static void af8133j_power_down(struct af8133j_data *data)
{ … }
static int af8133j_power_up(struct af8133j_data *data)
{ … }
static int af8133j_take_measurement(struct af8133j_data *data)
{ … }
static int af8133j_read_measurement(struct af8133j_data *data, __le16 buf[3])
{ … }
static const int af8133j_scales[][2] = …;
static int af8133j_read_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan, int *val,
int *val2, long mask)
{ … }
static int af8133j_read_avail(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
const int **vals, int *type, int *length,
long mask)
{ … }
static int af8133j_set_scale(struct af8133j_data *data,
unsigned int val, unsigned int val2)
{ … }
static int af8133j_write_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
int val, int val2, long mask)
{ … }
static int af8133j_write_raw_get_fmt(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
long mask)
{ … }
static const struct iio_info af8133j_info = …;
static irqreturn_t af8133j_trigger_handler(int irq, void *p)
{ … }
static const struct regmap_config af8133j_regmap_config = …;
static void af8133j_power_down_action(void *ptr)
{ … }
static int af8133j_probe(struct i2c_client *client)
{ … }
static int af8133j_runtime_suspend(struct device *dev)
{ … }
static int af8133j_runtime_resume(struct device *dev)
{ … }
static const struct dev_pm_ops af8133j_pm_ops = …;
static const struct of_device_id af8133j_of_match[] = …;
MODULE_DEVICE_TABLE(of, af8133j_of_match);
static const struct i2c_device_id af8133j_id[] = …;
MODULE_DEVICE_TABLE(i2c, af8133j_id);
static struct i2c_driver af8133j_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;