#include <linux/iio/iio.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/regulator/consumer.h>
#include <linux/spi/spi.h>
enum { … };
struct ti_dac_spec { … };
static const struct ti_dac_spec ti_dac_spec[] = …;
struct ti_dac_chip { … };
#define WRITE_NOT_UPDATE(chan) …
#define WRITE_AND_UPDATE(chan) …
#define WRITE_ALL_UPDATE …
#define POWERDOWN(mode) …
static int ti_dac_cmd(struct ti_dac_chip *ti_dac, u8 cmd, u16 val)
{ … }
static const char * const ti_dac_powerdown_modes[] = …;
static int ti_dac_get_powerdown_mode(struct iio_dev *indio_dev,
const struct iio_chan_spec *chan)
{ … }
static int ti_dac_set_powerdown_mode(struct iio_dev *indio_dev,
const struct iio_chan_spec *chan,
unsigned int mode)
{ … }
static const struct iio_enum ti_dac_powerdown_mode = …;
static ssize_t ti_dac_read_powerdown(struct iio_dev *indio_dev,
uintptr_t private,
const struct iio_chan_spec *chan,
char *buf)
{ … }
static ssize_t ti_dac_write_powerdown(struct iio_dev *indio_dev,
uintptr_t private,
const struct iio_chan_spec *chan,
const char *buf, size_t len)
{ … }
static const struct iio_chan_spec_ext_info ti_dac_ext_info[] = …;
#define TI_DAC_CHANNEL(chan) …
static const struct iio_chan_spec ti_dac_channels[] = …;
static int ti_dac_read_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
int *val, int *val2, long mask)
{ … }
static int ti_dac_write_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
int val, int val2, long mask)
{ … }
static int ti_dac_write_raw_get_fmt(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan, long mask)
{ … }
static const struct iio_info ti_dac_info = …;
static int ti_dac_probe(struct spi_device *spi)
{ … }
static void ti_dac_remove(struct spi_device *spi)
{ … }
static const struct of_device_id ti_dac_of_id[] = …;
MODULE_DEVICE_TABLE(of, ti_dac_of_id);
static const struct spi_device_id ti_dac_spi_id[] = …;
MODULE_DEVICE_TABLE(spi, ti_dac_spi_id);
static struct spi_driver ti_dac_driver = …;
module_spi_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;