linux/drivers/iio/potentiometer/ad5272.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * Analog Devices AD5272 digital potentiometer driver
 * Copyright (C) 2018 Phil Reid <[email protected]>
 *
 * Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/AD5272_5274.pdf
 *
 * DEVID	#Wipers	#Positions	Resistor Opts (kOhm)	i2c address
 * ad5272	1	1024		20, 50, 100		01011xx
 * ad5274	1	256		20, 100			01011xx
 */

#include <linux/delay.h>
#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/iio/iio.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>

#define AD5272_RDAC_WR
#define AD5272_RDAC_RD
#define AD5272_RESET
#define AD5272_CTL

#define AD5272_RDAC_WR_EN

struct ad5272_cfg {};

enum ad5272_type {};

static const struct ad5272_cfg ad5272_cfg[] =;

struct ad5272_data {};

static const struct iio_chan_spec ad5272_channel =;

static int ad5272_write(struct ad5272_data *data, int reg, int val)
{}

static int ad5272_read(struct ad5272_data *data, int reg, int *val)
{}

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

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

static const struct iio_info ad5272_info =;

static int ad5272_reset(struct ad5272_data *data)
{}

static int ad5272_probe(struct i2c_client *client)
{}

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

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

static struct i2c_driver ad5272_driver =;

module_i2c_driver();

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