#include <linux/bitfield.h>
#include <linux/device.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/property.h>
#include <linux/regulator/consumer.h>
#include <linux/spi/spi.h>
#include <linux/iio/iio.h>
#define ADI_VENDOR_ID …
#define AD7292_INTERNAL_REF_MV …
#define AD7292_REG_VENDOR_ID …
#define AD7292_REG_CONF_BANK …
#define AD7292_REG_CONV_COMM …
#define AD7292_REG_ADC_CH(x) …
#define AD7292_BANK_REG_VIN_RNG0 …
#define AD7292_BANK_REG_VIN_RNG1 …
#define AD7292_BANK_REG_SAMP_MODE …
#define AD7292_RD_FLAG_MSK(x) …
#define AD7292_ADC_DATA_MASK …
#define AD7292_ADC_DATA(x) …
#define AD7292_CH_SAMP_MODE(reg, ch) …
#define AD7292_CH_VIN_RANGE(reg, ch) …
#define AD7292_VOLTAGE_CHAN(_chan) …
static const struct iio_chan_spec ad7292_channels[] = …;
static const struct iio_chan_spec ad7292_channels_diff[] = …;
struct ad7292_state { … };
static int ad7292_spi_reg_read(struct ad7292_state *st, unsigned int addr)
{ … }
static int ad7292_spi_subreg_read(struct ad7292_state *st, unsigned int addr,
unsigned int sub_addr, unsigned int len)
{ … }
static int ad7292_single_conversion(struct ad7292_state *st,
unsigned int chan_addr)
{ … }
static int ad7292_vin_range_multiplier(struct ad7292_state *st, int channel)
{ … }
static int ad7292_read_raw(struct iio_dev *indio_dev,
const struct iio_chan_spec *chan,
int *val, int *val2, long info)
{ … }
static const struct iio_info ad7292_info = …;
static int ad7292_probe(struct spi_device *spi)
{ … }
static const struct spi_device_id ad7292_id_table[] = …;
MODULE_DEVICE_TABLE(spi, ad7292_id_table);
static const struct of_device_id ad7292_of_match[] = …;
MODULE_DEVICE_TABLE(of, ad7292_of_match);
static struct spi_driver ad7292_driver = …;
module_spi_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;