#include <linux/bits.h>
#include <linux/bitfield.h>
#include <linux/byteorder/generic.h>
#include <linux/cleanup.h>
#include <linux/device.h>
#include <linux/err.h>
#include <linux/math.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/gpio/consumer.h>
#include <linux/regulator/consumer.h>
#include <linux/spi/spi.h>
#include <linux/units.h>
#include <linux/util_macros.h>
#include <linux/iio/iio.h>
#include <linux/iio/buffer.h>
#include <linux/iio/triggered_buffer.h>
#include <linux/iio/trigger_consumer.h>
#define AD4000_READ_COMMAND …
#define AD4000_WRITE_COMMAND …
#define AD4000_CONFIG_REG_DEFAULT …
#define AD4000_CFG_SPAN_COMP …
#define AD4000_CFG_HIGHZ …
#define AD4000_SCALE_OPTIONS …
#define AD4000_TQUIET1_NS …
#define AD4000_TQUIET2_NS …
#define AD4000_TCONV_NS …
#define __AD4000_DIFF_CHANNEL(_sign, _real_bits, _storage_bits, _reg_access) …
#define AD4000_DIFF_CHANNEL(_sign, _real_bits, _reg_access) …
#define __AD4000_PSEUDO_DIFF_CHANNEL(_sign, _real_bits, _storage_bits, _reg_access) …
#define AD4000_PSEUDO_DIFF_CHANNEL(_sign, _real_bits, _reg_access) …
static const char * const ad4000_power_supplies[] = …;
enum ad4000_sdi { … };
static const char * const ad4000_sdi_pin[] = …;
static const int ad4000_gains[] = …;
struct ad4000_chip_info { … };
static const struct ad4000_chip_info ad4000_chip_info = …;
static const struct ad4000_chip_info ad4001_chip_info = …;
static const struct ad4000_chip_info ad4002_chip_info = …;
static const struct ad4000_chip_info ad4003_chip_info = …;
static const struct ad4000_chip_info ad4004_chip_info = …;
static const struct ad4000_chip_info ad4005_chip_info = …;
static const struct ad4000_chip_info ad4006_chip_info = …;
static const struct ad4000_chip_info ad4007_chip_info = …;
static const struct ad4000_chip_info ad4008_chip_info = …;
static const struct ad4000_chip_info ad4010_chip_info = …;
static const struct ad4000_chip_info ad4011_chip_info = …;
static const struct ad4000_chip_info ad4020_chip_info = …;
static const struct ad4000_chip_info ad4021_chip_info = …;
static const struct ad4000_chip_info ad4022_chip_info = …;
static const struct ad4000_chip_info adaq4001_chip_info = …;
static const struct ad4000_chip_info adaq4003_chip_info = …;
struct ad4000_state { … };
static void ad4000_fill_scale_tbl(struct ad4000_state *st,
struct iio_chan_spec const *chan)
{ … }
static int ad4000_write_reg(struct ad4000_state *st, uint8_t val)
{ … }
static int ad4000_read_reg(struct ad4000_state *st, unsigned int *val)
{ … }
static int ad4000_convert_and_acquire(struct ad4000_state *st)
{ … }
static int ad4000_single_conversion(struct iio_dev *indio_dev,
const struct iio_chan_spec *chan, int *val)
{ … }
static int ad4000_read_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan, int *val,
int *val2, long info)
{ … }
static int ad4000_read_avail(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
const int **vals, int *type, int *length,
long info)
{ … }
static int ad4000_write_raw_get_fmt(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan, long mask)
{ … }
static int ad4000_write_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan, int val, int val2,
long mask)
{ … }
static irqreturn_t ad4000_trigger_handler(int irq, void *p)
{ … }
static const struct iio_info ad4000_reg_access_info = …;
static const struct iio_info ad4000_info = …;
static int ad4000_prepare_3wire_mode_message(struct ad4000_state *st,
const struct iio_chan_spec *chan)
{ … }
static int ad4000_prepare_4wire_mode_message(struct ad4000_state *st,
const struct iio_chan_spec *chan)
{ … }
static int ad4000_config(struct ad4000_state *st)
{ … }
static int ad4000_probe(struct spi_device *spi)
{ … }
static const struct spi_device_id ad4000_id[] = …;
MODULE_DEVICE_TABLE(spi, ad4000_id);
static const struct of_device_id ad4000_of_match[] = …;
MODULE_DEVICE_TABLE(of, ad4000_of_match);
static struct spi_driver ad4000_driver = …;
module_spi_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;