#include <linux/bitops.h>
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/regulator/consumer.h>
#include <linux/regmap.h>
#include <linux/spi/spi.h>
#define LTC1660_REG_WAKE …
#define LTC1660_REG_DAC_A …
#define LTC1660_REG_DAC_B …
#define LTC1660_REG_DAC_C …
#define LTC1660_REG_DAC_D …
#define LTC1660_REG_DAC_E …
#define LTC1660_REG_DAC_F …
#define LTC1660_REG_DAC_G …
#define LTC1660_REG_DAC_H …
#define LTC1660_REG_SLEEP …
#define LTC1660_NUM_CHANNELS …
static const struct regmap_config ltc1660_regmap_config = …;
enum ltc1660_supported_device_ids { … };
struct ltc1660_priv { … };
static int ltc1660_read_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
int *val,
int *val2,
long mask)
{ … }
static int ltc1660_write_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
int val,
int val2,
long mask)
{ … }
#define LTC1660_CHAN(chan, bits) …
#define LTC1660_OCTAL_CHANNELS(bits) …
static const struct iio_chan_spec ltc1660_channels[][LTC1660_NUM_CHANNELS] = …;
static const struct iio_info ltc1660_info = …;
static int ltc1660_suspend(struct device *dev)
{ … }
static int ltc1660_resume(struct device *dev)
{ … }
static DEFINE_SIMPLE_DEV_PM_OPS(ltc1660_pm_ops, ltc1660_suspend,
ltc1660_resume);
static int ltc1660_probe(struct spi_device *spi)
{ … }
static void ltc1660_remove(struct spi_device *spi)
{ … }
static const struct of_device_id ltc1660_dt_ids[] = …;
MODULE_DEVICE_TABLE(of, ltc1660_dt_ids);
static const struct spi_device_id ltc1660_id[] = …;
MODULE_DEVICE_TABLE(spi, ltc1660_id);
static struct spi_driver ltc1660_driver = …;
module_spi_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;