linux/drivers/iio/potentiometer/max5487.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * max5487.c - Support for MAX5487, MAX5488, MAX5489 digital potentiometers
 *
 * Copyright (C) 2016 Cristina-Gabriela Moraru <[email protected]>
 */
#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

/* copy both wiper regs to NV regs */
#define MAX5487_COPY_AB_TO_NV
/* copy both NV regs to wiper regs */
#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();