linux/drivers/iio/potentiometer/mcp4018.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Industrial I/O driver for Microchip digital potentiometers
 * Copyright (c) 2018  Axentia Technologies AB
 * Author: Peter Rosin <[email protected]>
 *
 * Datasheet: http://www.microchip.com/downloads/en/DeviceDoc/22147a.pdf
 *
 * DEVID	#Wipers	#Positions	Resistor Opts (kOhm)
 * mcp4017	1	128		5, 10, 50, 100
 * mcp4018	1	128		5, 10, 50, 100
 * mcp4019	1	128		5, 10, 50, 100
 */

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

#define MCP4018_WIPER_MAX

struct mcp4018_cfg {};

enum mcp4018_type {};

static const struct mcp4018_cfg mcp4018_cfg[] =;

struct mcp4018_data {};

static const struct iio_chan_spec mcp4018_channel =;

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

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

static const struct iio_info mcp4018_info =;

#define MCP4018_ID_TABLE(_name, cfg)

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

#define MCP4018_COMPATIBLE(of_compatible, cfg)

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

static int mcp4018_probe(struct i2c_client *client)
{}

static struct i2c_driver mcp4018_driver =;

module_i2c_driver();

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