#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/spi/spi.h>
#include <linux/gpio/consumer.h>
#include <linux/iio/iio.h>
#define DAC7612_RESOLUTION …
#define DAC7612_ADDRESS …
#define DAC7612_START …
struct dac7612 { … };
static int dac7612_cmd_single(struct dac7612 *priv, int channel, u16 val)
{ … }
#define dac7612_CHANNEL(chan, name) …
static const struct iio_chan_spec dac7612_channels[] = …;
static int dac7612_read_raw(struct iio_dev *iio_dev,
const struct iio_chan_spec *chan,
int *val, int *val2, long mask)
{ … }
static int dac7612_write_raw(struct iio_dev *iio_dev,
const struct iio_chan_spec *chan,
int val, int val2, long mask)
{ … }
static const struct iio_info dac7612_info = …;
static int dac7612_probe(struct spi_device *spi)
{ … }
static const struct spi_device_id dac7612_id[] = …;
MODULE_DEVICE_TABLE(spi, dac7612_id);
static const struct of_device_id dac7612_of_match[] = …;
MODULE_DEVICE_TABLE(of, dac7612_of_match);
static struct spi_driver dac7612_driver = …;
module_spi_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;