linux/drivers/iio/dac/ad5764.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Analog devices AD5764, AD5764R, AD5744, AD5744R quad-channel
 * Digital to Analog Converters driver
 *
 * Copyright 2011 Analog Devices Inc.
 */

#include <linux/device.h>
#include <linux/err.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/spi/spi.h>
#include <linux/slab.h>
#include <linux/sysfs.h>
#include <linux/regulator/consumer.h>

#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>

#define AD5764_REG_SF_NOP
#define AD5764_REG_SF_CONFIG
#define AD5764_REG_SF_CLEAR
#define AD5764_REG_SF_LOAD
#define AD5764_REG_DATA(x)
#define AD5764_REG_COARSE_GAIN(x)
#define AD5764_REG_FINE_GAIN(x)
#define AD5764_REG_OFFSET(x)

#define AD5764_NUM_CHANNELS

/**
 * struct ad5764_chip_info - chip specific information
 * @int_vref:	Value of the internal reference voltage in uV - 0 if external
 *		reference voltage is used
 * @channels:	channel specification
*/
struct ad5764_chip_info {};

/**
 * struct ad5764_state - driver instance specific data
 * @spi:		spi_device
 * @chip_info:		chip info
 * @vref_reg:		vref supply regulators
 * @lock:		lock to protect the data buffer during SPI ops
 * @data:		spi transfer buffers
 */

struct ad5764_state {};

enum ad5764_type {};

#define AD5764_CHANNEL(_chan, _bits)

#define DECLARE_AD5764_CHANNELS(_name, _bits)

static DECLARE_AD5764_CHANNELS(ad5764, 16);
static DECLARE_AD5764_CHANNELS(ad5744, 14);

static const struct ad5764_chip_info ad5764_chip_infos[] =;

static int ad5764_write(struct iio_dev *indio_dev, unsigned int reg,
	unsigned int val)
{}

static int ad5764_read(struct iio_dev *indio_dev, unsigned int reg,
	unsigned int *val)
{}

static int ad5764_chan_info_to_reg(struct iio_chan_spec const *chan, long info)
{}

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

static int ad5764_get_channel_vref(struct ad5764_state *st,
	unsigned int channel)
{}

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

static const struct iio_info ad5764_info =;

static int ad5764_probe(struct spi_device *spi)
{}

static void ad5764_remove(struct spi_device *spi)
{}

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

static struct spi_driver ad5764_driver =;
module_spi_driver();

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