#include <linux/err.h>
#include <linux/spi/spi.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/interrupt.h>
#include <linux/iio/iio.h>
#include <linux/iio/buffer.h>
#include <linux/iio/triggered_buffer.h>
#include <linux/iio/trigger_consumer.h>
#include <linux/regulator/consumer.h>
#define ADC084S021_DRIVER_NAME …
struct adc084s021 { … };
#define ADC084S021_VOLTAGE_CHANNEL(num) …
static const struct iio_chan_spec adc084s021_channels[] = …;
static int adc084s021_adc_conversion(struct adc084s021 *adc, __be16 *data)
{ … }
static int adc084s021_read_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *channel, int *val,
int *val2, long mask)
{ … }
static irqreturn_t adc084s021_buffer_trigger_handler(int irq, void *pollfunc)
{ … }
static int adc084s021_buffer_preenable(struct iio_dev *indio_dev)
{ … }
static int adc084s021_buffer_postdisable(struct iio_dev *indio_dev)
{ … }
static const struct iio_info adc084s021_info = …;
static const struct iio_buffer_setup_ops adc084s021_buffer_setup_ops = …;
static int adc084s021_probe(struct spi_device *spi)
{ … }
static const struct of_device_id adc084s021_of_match[] = …;
MODULE_DEVICE_TABLE(of, adc084s021_of_match);
static const struct spi_device_id adc084s021_id[] = …;
MODULE_DEVICE_TABLE(spi, adc084s021_id);
static struct spi_driver adc084s021_driver = …;
module_spi_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_VERSION(…) …;