linux/drivers/iio/potentiometer/mcp4531.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Industrial I/O driver for Microchip digital potentiometers
 * Copyright (c) 2015  Axentia Technologies AB
 * Author: Peter Rosin <[email protected]>
 *
 * Datasheet: http://www.microchip.com/downloads/en/DeviceDoc/22096b.pdf
 *
 * DEVID	#Wipers	#Positions	Resistor Opts (kOhm)	i2c address
 * mcp4531	1	129		5, 10, 50, 100          010111x
 * mcp4532	1	129		5, 10, 50, 100          01011xx
 * mcp4541	1	129		5, 10, 50, 100          010111x
 * mcp4542	1	129		5, 10, 50, 100          01011xx
 * mcp4551	1	257		5, 10, 50, 100          010111x
 * mcp4552	1	257		5, 10, 50, 100          01011xx
 * mcp4561	1	257		5, 10, 50, 100          010111x
 * mcp4562	1	257		5, 10, 50, 100          01011xx
 * mcp4631	2	129		5, 10, 50, 100          0101xxx
 * mcp4632	2	129		5, 10, 50, 100          01011xx
 * mcp4641	2	129		5, 10, 50, 100          0101xxx
 * mcp4642	2	129		5, 10, 50, 100          01011xx
 * mcp4651	2	257		5, 10, 50, 100          0101xxx
 * mcp4652	2	257		5, 10, 50, 100          01011xx
 * mcp4661	2	257		5, 10, 50, 100          0101xxx
 * mcp4662	2	257		5, 10, 50, 100          01011xx
 */

#include <linux/module.h>
#include <linux/i2c.h>
#include <linux/err.h>
#include <linux/mod_devicetable.h>
#include <linux/property.h>

#include <linux/iio/iio.h>

struct mcp4531_cfg {};

enum mcp4531_type {};

static const struct mcp4531_cfg mcp4531_cfg[] =;

#define MCP4531_WRITE
#define MCP4531_INCR
#define MCP4531_DECR
#define MCP4531_READ

#define MCP4531_WIPER_SHIFT

struct mcp4531_data {};

#define MCP4531_CHANNEL(ch)

static const struct iio_chan_spec mcp4531_channels[] =;

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

static int mcp4531_read_avail(struct iio_dev *indio_dev,
			      struct iio_chan_spec const *chan,
			      const int **vals, int *type, int *length,
			      long mask)
{}

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

static const struct iio_info mcp4531_info =;

#define MCP4531_ID_TABLE(_name, cfg)

static const struct i2c_device_id mcp4531_id[] =;
MODULE_DEVICE_TABLE(i2c, mcp4531_id);

#define MCP4531_COMPATIBLE(of_compatible, cfg)

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

static int mcp4531_probe(struct i2c_client *client)
{}

static struct i2c_driver mcp4531_driver =;

module_i2c_driver();

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