#include <linux/iio/iio.h>
#include <linux/i2c.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/property.h>
#include <linux/regulator/consumer.h>
enum chip_id { … };
struct dac5571_spec { … };
static const struct dac5571_spec dac5571_spec[] = …;
struct dac5571_data { … };
#define DAC5571_POWERDOWN(mode) …
#define DAC5571_POWERDOWN_FLAG …
#define DAC5571_CHANNEL_SELECT …
#define DAC5571_LOADMODE_DIRECT …
#define DAC5571_SINGLE_PWRDWN_BITS …
#define DAC5571_QUAD_PWRDWN_BITS …
static int dac5571_cmd_single(struct dac5571_data *data, int channel, u16 val)
{ … }
static int dac5571_cmd_quad(struct dac5571_data *data, int channel, u16 val)
{ … }
static int dac5571_pwrdwn_single(struct dac5571_data *data, int channel, u8 pwrdwn)
{ … }
static int dac5571_pwrdwn_quad(struct dac5571_data *data, int channel, u8 pwrdwn)
{ … }
static const char *const dac5571_powerdown_modes[] = …;
static int dac5571_get_powerdown_mode(struct iio_dev *indio_dev,
const struct iio_chan_spec *chan)
{ … }
static int dac5571_set_powerdown_mode(struct iio_dev *indio_dev,
const struct iio_chan_spec *chan,
unsigned int mode)
{ … }
static const struct iio_enum dac5571_powerdown_mode = …;
static ssize_t dac5571_read_powerdown(struct iio_dev *indio_dev,
uintptr_t private,
const struct iio_chan_spec *chan,
char *buf)
{ … }
static ssize_t dac5571_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 dac5571_ext_info[] = …;
#define dac5571_CHANNEL(chan, name) …
static const struct iio_chan_spec dac5571_channels[] = …;
static int dac5571_read_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
int *val, int *val2, long mask)
{ … }
static int dac5571_write_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
int val, int val2, long mask)
{ … }
static int dac5571_write_raw_get_fmt(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
long mask)
{ … }
static const struct iio_info dac5571_info = …;
static int dac5571_probe(struct i2c_client *client)
{ … }
static void dac5571_remove(struct i2c_client *i2c)
{ … }
static const struct of_device_id dac5571_of_id[] = …;
MODULE_DEVICE_TABLE(of, dac5571_of_id);
static const struct i2c_device_id dac5571_id[] = …;
MODULE_DEVICE_TABLE(i2c, dac5571_id);
static struct i2c_driver dac5571_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;