linux/drivers/iio/dac/ad5686.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
 * This file is part of AD5686 DAC driver
 *
 * Copyright 2018 Analog Devices Inc.
 */

#ifndef __DRIVERS_IIO_DAC_AD5686_H__
#define __DRIVERS_IIO_DAC_AD5686_H__

#include <linux/types.h>
#include <linux/cache.h>
#include <linux/mutex.h>
#include <linux/kernel.h>

#include <linux/iio/iio.h>

#define AD5310_CMD(x)

#define AD5683_DATA(x)

#define AD5686_ADDR(x)
#define AD5686_CMD(x)

#define AD5686_ADDR_DAC(chan)
#define AD5686_ADDR_ALL_DAC

#define AD5686_CMD_NOOP
#define AD5686_CMD_WRITE_INPUT_N
#define AD5686_CMD_UPDATE_DAC_N
#define AD5686_CMD_WRITE_INPUT_N_UPDATE_N
#define AD5686_CMD_POWERDOWN_DAC
#define AD5686_CMD_LDAC_MASK
#define AD5686_CMD_RESET
#define AD5686_CMD_INTERNAL_REFER_SETUP
#define AD5686_CMD_DAISY_CHAIN_ENABLE
#define AD5686_CMD_READBACK_ENABLE

#define AD5686_LDAC_PWRDN_NONE
#define AD5686_LDAC_PWRDN_1K
#define AD5686_LDAC_PWRDN_100K
#define AD5686_LDAC_PWRDN_3STATE

#define AD5686_CMD_CONTROL_REG
#define AD5686_CMD_READBACK_ENABLE_V2

#define AD5310_REF_BIT_MSK
#define AD5683_REF_BIT_MSK
#define AD5693_REF_BIT_MSK

/**
 * ad5686_supported_device_ids:
 */
enum ad5686_supported_device_ids {};

enum ad5686_regmap_type {};

struct ad5686_state;

ad5686_write_func;

ad5686_read_func;

/**
 * struct ad5686_chip_info - chip specific information
 * @int_vref_mv:	AD5620/40/60: the internal reference voltage
 * @num_channels:	number of channels
 * @channel:		channel specification
 * @regmap_type:	register map layout variant
 */

struct ad5686_chip_info {};

/**
 * struct ad5446_state - driver instance specific data
 * @spi:		spi_device
 * @chip_info:		chip model specific constants, available modes etc
 * @reg:		supply regulator
 * @vref_mv:		actual reference voltage used
 * @pwr_down_mask:	power down mask
 * @pwr_down_mode:	current power down mode
 * @use_internal_vref:	set to true if the internal reference voltage is used
 * @lock		lock to protect the data buffer during regmap ops
 * @data:		spi transfer buffers
 */

struct ad5686_state {};


int ad5686_probe(struct device *dev,
		 enum ad5686_supported_device_ids chip_type,
		 const char *name, ad5686_write_func write,
		 ad5686_read_func read);

void ad5686_remove(struct device *dev);


#endif /* __DRIVERS_IIO_DAC_AD5686_H__ */