#include <linux/err.h>
#include <linux/iio/iio.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/property.h>
#include <linux/regulator/consumer.h>
#include <linux/spi/spi.h>
struct adc128_configuration { … };
struct adc128 { … };
static int adc128_adc_conversion(struct adc128 *adc, u8 channel)
{ … }
static int adc128_read_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *channel, int *val,
int *val2, long mask)
{ … }
#define ADC128_VOLTAGE_CHANNEL(num) …
static const struct iio_chan_spec adc128s052_channels[] = …;
static const struct iio_chan_spec adc122s021_channels[] = …;
static const struct iio_chan_spec adc124s021_channels[] = …;
static const struct adc128_configuration adc128_config[] = …;
static const struct iio_info adc128_info = …;
static void adc128_disable_regulator(void *reg)
{ … }
static int adc128_probe(struct spi_device *spi)
{ … }
static const struct of_device_id adc128_of_match[] = …;
MODULE_DEVICE_TABLE(of, adc128_of_match);
static const struct spi_device_id adc128_id[] = …;
MODULE_DEVICE_TABLE(spi, adc128_id);
static const struct acpi_device_id adc128_acpi_match[] = …;
MODULE_DEVICE_TABLE(acpi, adc128_acpi_match);
static struct spi_driver adc128_driver = …;
module_spi_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;