linux/drivers/iio/potentiometer/mcp41010.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Industrial I/O driver for Microchip digital potentiometers
 *
 * Copyright (c) 2018 Chris Coffey <[email protected]>
 * Based on: Slawomir Stepien's code from mcp4131.c
 *
 * Datasheet: https://ww1.microchip.com/downloads/en/devicedoc/11195c.pdf
 *
 * DEVID	#Wipers	#Positions	Resistance (kOhm)
 * mcp41010	1	256		10
 * mcp41050	1	256		50
 * mcp41100	1	256		100
 * mcp42010	2	256		10
 * mcp42050	2	256		50
 * mcp42100	2	256		100
 */

#include <linux/cache.h>
#include <linux/err.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 MCP41010_MAX_WIPERS
#define MCP41010_WRITE
#define MCP41010_WIPER_MAX
#define MCP41010_WIPER_CHANNEL

struct mcp41010_cfg {};

enum mcp41010_type {};

static const struct mcp41010_cfg mcp41010_cfg[] =;

struct mcp41010_data {};

#define MCP41010_CHANNEL(ch)

static const struct iio_chan_spec mcp41010_channels[] =;

static int mcp41010_read_raw(struct iio_dev *indio_dev,
			    struct iio_chan_spec const *chan,
			    int *val, int *val2, long mask)
{}

static int mcp41010_write_raw(struct iio_dev *indio_dev,
			     struct iio_chan_spec const *chan,
			     int val, int val2, long mask)
{}

static const struct iio_info mcp41010_info =;

static int mcp41010_probe(struct spi_device *spi)
{}

static const struct of_device_id mcp41010_match[] =;
MODULE_DEVICE_TABLE(of, mcp41010_match);

static const struct spi_device_id mcp41010_id[] =;
MODULE_DEVICE_TABLE(spi, mcp41010_id);

static struct spi_driver mcp41010_driver =;

module_spi_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();