#include <linux/device.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/sysfs.h>
#include <linux/spi/spi.h>
#include <linux/regulator/consumer.h>
#include <linux/err.h>
#include <linux/delay.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/bitops.h>
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
#include <linux/iio/buffer.h>
#include <linux/iio/trigger_consumer.h>
#include <linux/iio/triggered_buffer.h>
#define AD7298_WRITE …
#define AD7298_REPEAT …
#define AD7298_CH(x) …
#define AD7298_TSENSE …
#define AD7298_EXTREF …
#define AD7298_TAVG …
#define AD7298_PDD …
#define AD7298_MAX_CHAN …
#define AD7298_INTREF_mV …
#define AD7298_CH_TEMP …
struct ad7298_state { … };
#define AD7298_V_CHAN(index) …
static const struct iio_chan_spec ad7298_channels[] = …;
static int ad7298_update_scan_mode(struct iio_dev *indio_dev,
const unsigned long *active_scan_mask)
{ … }
static irqreturn_t ad7298_trigger_handler(int irq, void *p)
{ … }
static int ad7298_scan_direct(struct ad7298_state *st, unsigned ch)
{ … }
static int ad7298_scan_temp(struct ad7298_state *st, int *val)
{ … }
static int ad7298_get_ref_voltage(struct ad7298_state *st)
{ … }
static int ad7298_read_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
int *val,
int *val2,
long m)
{ … }
static const struct iio_info ad7298_info = …;
static void ad7298_reg_disable(void *data)
{ … }
static int ad7298_probe(struct spi_device *spi)
{ … }
static const struct acpi_device_id ad7298_acpi_ids[] = …;
MODULE_DEVICE_TABLE(acpi, ad7298_acpi_ids);
static const struct spi_device_id ad7298_id[] = …;
MODULE_DEVICE_TABLE(spi, ad7298_id);
static struct spi_driver ad7298_driver = …;
module_spi_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;