#include <linux/cache.h>
#include <linux/err.h>
#include <linux/export.h>
#include <linux/iio/iio.h>
#include <linux/iio/types.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/mutex.h>
#include <linux/property.h>
#include <linux/spi/spi.h>
#define MCP4131_WRITE …
#define MCP4131_READ …
#define MCP4131_WIPER_SHIFT …
#define MCP4131_CMDERR(r) …
#define MCP4131_RAW(r) …
struct mcp4131_cfg { … };
enum mcp4131_type { … };
static const struct mcp4131_cfg mcp4131_cfg[] = …;
struct mcp4131_data { … };
#define MCP4131_CHANNEL(ch) …
static const struct iio_chan_spec mcp4131_channels[] = …;
static int mcp4131_read(struct spi_device *spi, void *buf, size_t len)
{ … }
static int mcp4131_read_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
int *val, int *val2, long mask)
{ … }
static int mcp4131_write_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
int val, int val2, long mask)
{ … }
static const struct iio_info mcp4131_info = …;
static int mcp4131_probe(struct spi_device *spi)
{ … }
static const struct of_device_id mcp4131_dt_ids[] = …;
MODULE_DEVICE_TABLE(of, mcp4131_dt_ids);
static const struct spi_device_id mcp4131_id[] = …;
MODULE_DEVICE_TABLE(spi, mcp4131_id);
static struct spi_driver mcp4131_driver = …;
module_spi_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;