#include <linux/align.h>
#include <linux/bitfield.h>
#include <linux/bitops.h>
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/err.h>
#include <linux/gpio/consumer.h>
#include <linux/module.h>
#include <linux/property.h>
#include <linux/regulator/consumer.h>
#include <linux/spi/spi.h>
#include <linux/string_helpers.h>
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
#include <linux/iio/trigger_consumer.h>
#include <linux/iio/triggered_buffer.h>
#define AD7944_INTERNAL_REF_MV …
struct ad7944_timing_spec { … };
enum ad7944_spi_mode { … };
static const char * const ad7944_spi_modes[] = …;
struct ad7944_adc { … };
#define T_QUIET_NS …
static const struct ad7944_timing_spec ad7944_timing_spec = …;
static const struct ad7944_timing_spec ad7986_timing_spec = …;
struct ad7944_chip_info { … };
#define AD7944_DEFINE_CHIP_INFO(_name, _ts, _bits, _diff) …
AD7944_DEFINE_CHIP_INFO(…);
AD7944_DEFINE_CHIP_INFO(…);
AD7944_DEFINE_CHIP_INFO(…);
static int ad7944_3wire_cs_mode_init_msg(struct device *dev, struct ad7944_adc *adc,
const struct iio_chan_spec *chan)
{ … }
static int ad7944_4wire_mode_init_msg(struct device *dev, struct ad7944_adc *adc,
const struct iio_chan_spec *chan)
{ … }
static int ad7944_chain_mode_init_msg(struct device *dev, struct ad7944_adc *adc,
const struct iio_chan_spec *chan,
u32 n_chain_dev)
{ … }
static int ad7944_convert_and_acquire(struct ad7944_adc *adc)
{ … }
static int ad7944_single_conversion(struct ad7944_adc *adc,
const struct iio_chan_spec *chan,
int *val)
{ … }
static int ad7944_read_raw(struct iio_dev *indio_dev,
const struct iio_chan_spec *chan,
int *val, int *val2, long info)
{ … }
static const struct iio_info ad7944_iio_info = …;
static irqreturn_t ad7944_trigger_handler(int irq, void *p)
{ … }
static int ad7944_chain_mode_alloc(struct device *dev,
const struct iio_chan_spec *chan_template,
u32 n_chain_dev,
struct iio_chan_spec **chain_chan,
void **chain_mode_buf,
unsigned long **chain_scan_masks)
{ … }
static const char * const ad7944_power_supplies[] = …;
static int ad7944_probe(struct spi_device *spi)
{ … }
static const struct of_device_id ad7944_of_match[] = …;
MODULE_DEVICE_TABLE(of, ad7944_of_match);
static const struct spi_device_id ad7944_spi_id[] = …;
MODULE_DEVICE_TABLE(spi, ad7944_spi_id);
static struct spi_driver ad7944_driver = …;
module_spi_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;