#include <linux/delay.h>
#include <linux/iio/iio.h>
#include <linux/module.h>
#include <linux/regulator/consumer.h>
#include <linux/spi/spi.h>
#include <linux/bitfield.h>
#define AD7949_CFG_MASK_TOTAL …
#define AD7949_CFG_MASK_OVERWRITE …
#define AD7949_CFG_MASK_INCC …
#define AD7949_CFG_VAL_INCC_UNIPOLAR_GND …
#define AD7949_CFG_VAL_INCC_UNIPOLAR_COMM …
#define AD7949_CFG_VAL_INCC_UNIPOLAR_DIFF …
#define AD7949_CFG_VAL_INCC_TEMP …
#define AD7949_CFG_VAL_INCC_BIPOLAR …
#define AD7949_CFG_VAL_INCC_BIPOLAR_DIFF …
#define AD7949_CFG_MASK_INX …
#define AD7949_CFG_MASK_BW_FULL …
#define AD7949_CFG_MASK_REF …
#define AD7949_CFG_VAL_REF_EXT_TEMP_BUF …
#define AD7949_CFG_VAL_REF_EXT_TEMP …
#define AD7949_CFG_VAL_REF_INT_4096 …
#define AD7949_CFG_VAL_REF_INT_2500 …
#define AD7949_CFG_VAL_REF_EXTERNAL …
#define AD7949_CFG_MASK_SEQ …
#define AD7949_CFG_MASK_RBN …
enum { … };
struct ad7949_adc_spec { … };
static const struct ad7949_adc_spec ad7949_adc_spec[] = …;
struct ad7949_adc_chip { … };
static int ad7949_spi_write_cfg(struct ad7949_adc_chip *ad7949_adc, u16 val,
u16 mask)
{ … }
static int ad7949_spi_read_channel(struct ad7949_adc_chip *ad7949_adc, int *val,
unsigned int channel)
{ … }
#define AD7949_ADC_CHANNEL(chan) …
static const struct iio_chan_spec ad7949_adc_channels[] = …;
static int ad7949_spi_read_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
int *val, int *val2, long mask)
{ … }
static int ad7949_spi_reg_access(struct iio_dev *indio_dev,
unsigned int reg, unsigned int writeval,
unsigned int *readval)
{ … }
static const struct iio_info ad7949_spi_info = …;
static int ad7949_spi_init(struct ad7949_adc_chip *ad7949_adc)
{ … }
static void ad7949_disable_reg(void *reg)
{ … }
static int ad7949_spi_probe(struct spi_device *spi)
{ … }
static const struct of_device_id ad7949_spi_of_id[] = …;
MODULE_DEVICE_TABLE(of, ad7949_spi_of_id);
static const struct spi_device_id ad7949_spi_id[] = …;
MODULE_DEVICE_TABLE(spi, ad7949_spi_id);
static struct spi_driver ad7949_spi_driver = …;
module_spi_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;