#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/spi/spi.h>
#include <linux/iio/sysfs.h>
#include <linux/iio/iio.h>
#define MAX5487_WRITE_WIPER_A …
#define MAX5487_WRITE_WIPER_B …
#define MAX5487_COPY_AB_TO_NV …
#define MAX5487_COPY_NV_TO_AB …
#define MAX5487_MAX_POS …
struct max5487_data { … };
#define MAX5487_CHANNEL(ch, addr) …
static const struct iio_chan_spec max5487_channels[] = …;
static int max5487_write_cmd(struct spi_device *spi, u16 cmd)
{ … }
static int max5487_read_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
int *val, int *val2, long mask)
{ … }
static int max5487_write_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
int val, int val2, long mask)
{ … }
static const struct iio_info max5487_info = …;
static int max5487_spi_probe(struct spi_device *spi)
{ … }
static void max5487_spi_remove(struct spi_device *spi)
{ … }
static const struct spi_device_id max5487_id[] = …;
MODULE_DEVICE_TABLE(spi, max5487_id);
static const struct acpi_device_id max5487_acpi_match[] = …;
MODULE_DEVICE_TABLE(acpi, max5487_acpi_match);
static struct spi_driver max5487_driver = …;
module_spi_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;