#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/spi/spi.h>
#include <linux/iio/iio.h>
#include <linux/regulator/consumer.h>
#include <linux/iio/buffer.h>
#include <linux/iio/trigger.h>
#include <linux/iio/triggered_buffer.h>
#include <linux/iio/trigger_consumer.h>
enum { … };
struct adc0832 { … };
#define ADC0832_VOLTAGE_CHANNEL(chan) …
#define ADC0832_VOLTAGE_CHANNEL_DIFF(chan1, chan2, si) …
static const struct iio_chan_spec adc0831_channels[] = …;
static const struct iio_chan_spec adc0832_channels[] = …;
static const struct iio_chan_spec adc0834_channels[] = …;
static const struct iio_chan_spec adc0838_channels[] = …;
static int adc0831_adc_conversion(struct adc0832 *adc)
{ … }
static int adc0832_adc_conversion(struct adc0832 *adc, int channel,
bool differential)
{ … }
static int adc0832_read_raw(struct iio_dev *iio,
struct iio_chan_spec const *channel, int *value,
int *shift, long mask)
{ … }
static const struct iio_info adc0832_info = …;
static irqreturn_t adc0832_trigger_handler(int irq, void *p)
{ … }
static void adc0832_reg_disable(void *reg)
{ … }
static int adc0832_probe(struct spi_device *spi)
{ … }
static const struct of_device_id adc0832_dt_ids[] = …;
MODULE_DEVICE_TABLE(of, adc0832_dt_ids);
static const struct spi_device_id adc0832_id[] = …;
MODULE_DEVICE_TABLE(spi, adc0832_id);
static struct spi_driver adc0832_driver = …;
module_spi_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;