linux/drivers/misc/ad525x_dpot.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * Driver for the Analog Devices digital potentiometers
 *
 * Copyright (C) 2010 Michael Hennerich, Analog Devices Inc.
 */

#ifndef _AD_DPOT_H_
#define _AD_DPOT_H_

#include <linux/types.h>

#define DPOT_CONF(features, wipers, max_pos, uid)

#define DPOT_UID(conf)
#define DPOT_MAX_POS(conf)
#define DPOT_WIPERS(conf)
#define DPOT_FEAT(conf)

#define BRDAC0
#define BRDAC1
#define BRDAC2
#define BRDAC3
#define BRDAC4
#define BRDAC5
#define MAX_RDACS

#define F_CMD_INC
#define F_CMD_EEP
#define F_CMD_OTP
#define F_CMD_TOL
#define F_RDACS_RW
#define F_RDACS_WONLY
#define F_AD_APPDATA
#define F_SPI_8BIT
#define F_SPI_16BIT
#define F_SPI_24BIT

#define F_RDACS_RW_TOL
#define F_RDACS_RW_EEP
#define F_SPI

enum dpot_devid {};

#define DPOT_RDAC0
#define DPOT_RDAC1
#define DPOT_RDAC2
#define DPOT_RDAC3
#define DPOT_RDAC4
#define DPOT_RDAC5

#define DPOT_RDAC_MASK

#define DPOT_REG_TOL
#define DPOT_TOL_RDAC0
#define DPOT_TOL_RDAC1
#define DPOT_TOL_RDAC2
#define DPOT_TOL_RDAC3
#define DPOT_TOL_RDAC4
#define DPOT_TOL_RDAC5

/* RDAC-to-EEPROM Interface Commands */
#define DPOT_ADDR_RDAC
#define DPOT_ADDR_EEPROM
#define DPOT_ADDR_OTP
#define DPOT_ADDR_CMD
#define DPOT_ADDR_OTP_EN

#define DPOT_DEC_ALL_6DB
#define DPOT_INC_ALL_6DB
#define DPOT_DEC_ALL
#define DPOT_INC_ALL

#define DPOT_SPI_RDAC
#define DPOT_SPI_EEPROM
#define DPOT_SPI_READ_RDAC
#define DPOT_SPI_READ_EEPROM
#define DPOT_SPI_DEC_ALL_6DB
#define DPOT_SPI_INC_ALL_6DB
#define DPOT_SPI_DEC_ALL
#define DPOT_SPI_INC_ALL

/* AD5291/2/3 use special commands */
#define DPOT_AD5291_RDAC
#define DPOT_AD5291_READ_RDAC
#define DPOT_AD5291_STORE_XTPM
#define DPOT_AD5291_CTRLREG
#define DPOT_AD5291_UNLOCK_CMD

/* AD5270/1/2/4 use special commands */
#define DPOT_AD5270_1_2_4_RDAC
#define DPOT_AD5270_1_2_4_READ_RDAC
#define DPOT_AD5270_1_2_4_STORE_XTPM
#define DPOT_AD5270_1_2_4_CTRLREG
#define DPOT_AD5270_1_2_4_UNLOCK_CMD

#define DPOT_AD5282_RDAC_AB

#define DPOT_AD5273_FUSE
#define DPOT_AD5170_2_3_FUSE
#define DPOT_AD5170_2_3_OW
#define DPOT_AD5172_3_A0
#define DPOT_AD5170_2FUSE

struct dpot_data;

struct ad_dpot_bus_ops {};

struct ad_dpot_bus_data {};

int ad_dpot_probe(struct device *dev, struct ad_dpot_bus_data *bdata,
		  unsigned long devid, const char *name);
void ad_dpot_remove(struct device *dev);

#endif