Linux Kernel
3.7.1
|
#include <linux/types.h>
Go to the source code of this file.
Data Structures | |
struct | ad_dpot_bus_ops |
struct | ad_dpot_bus_data |
Macros | |
#define | DPOT_CONF(features, wipers, max_pos, uid) |
#define | DPOT_UID(conf) (conf & 0x3F) |
#define | DPOT_MAX_POS(conf) ((conf >> 6) & 0xF) |
#define | DPOT_WIPERS(conf) ((conf >> 10) & 0xFF) |
#define | DPOT_FEAT(conf) (conf >> 18) |
#define | BRDAC0 (1 << 0) |
#define | BRDAC1 (1 << 1) |
#define | BRDAC2 (1 << 2) |
#define | BRDAC3 (1 << 3) |
#define | BRDAC4 (1 << 4) |
#define | BRDAC5 (1 << 5) |
#define | MAX_RDACS 6 |
#define | F_CMD_INC (1 << 0) /* Features INC/DEC ALL, 6dB */ |
#define | F_CMD_EEP (1 << 1) /* Features EEPROM */ |
#define | F_CMD_OTP (1 << 2) /* Features OTP */ |
#define | F_CMD_TOL (1 << 3) /* RDACS feature Tolerance REG */ |
#define | F_RDACS_RW (1 << 4) /* RDACS are Read/Write */ |
#define | F_RDACS_WONLY (1 << 5) /* RDACS are Write only */ |
#define | F_AD_APPDATA (1 << 6) /* RDAC Address append to data */ |
#define | F_SPI_8BIT (1 << 7) /* All SPI XFERS are 8-bit */ |
#define | F_SPI_16BIT (1 << 8) /* All SPI XFERS are 16-bit */ |
#define | F_SPI_24BIT (1 << 9) /* All SPI XFERS are 24-bit */ |
#define | F_RDACS_RW_TOL (F_RDACS_RW | F_CMD_EEP | F_CMD_TOL) |
#define | F_RDACS_RW_EEP (F_RDACS_RW | F_CMD_EEP) |
#define | F_SPI (F_SPI_8BIT | F_SPI_16BIT | F_SPI_24BIT) |
#define | DPOT_RDAC0 0 |
#define | DPOT_RDAC1 1 |
#define | DPOT_RDAC2 2 |
#define | DPOT_RDAC3 3 |
#define | DPOT_RDAC4 4 |
#define | DPOT_RDAC5 5 |
#define | DPOT_RDAC_MASK 0x1F |
#define | DPOT_REG_TOL 0x18 |
#define | DPOT_TOL_RDAC0 (DPOT_REG_TOL | DPOT_RDAC0) |
#define | DPOT_TOL_RDAC1 (DPOT_REG_TOL | DPOT_RDAC1) |
#define | DPOT_TOL_RDAC2 (DPOT_REG_TOL | DPOT_RDAC2) |
#define | DPOT_TOL_RDAC3 (DPOT_REG_TOL | DPOT_RDAC3) |
#define | DPOT_TOL_RDAC4 (DPOT_REG_TOL | DPOT_RDAC4) |
#define | DPOT_TOL_RDAC5 (DPOT_REG_TOL | DPOT_RDAC5) |
#define | DPOT_ADDR_RDAC (0x0 << 5) |
#define | DPOT_ADDR_EEPROM (0x1 << 5) |
#define | DPOT_ADDR_OTP (0x1 << 6) |
#define | DPOT_ADDR_CMD (0x1 << 7) |
#define | DPOT_ADDR_OTP_EN (0x1 << 9) |
#define | DPOT_DEC_ALL_6DB (DPOT_ADDR_CMD | (0x4 << 3)) |
#define | DPOT_INC_ALL_6DB (DPOT_ADDR_CMD | (0x9 << 3)) |
#define | DPOT_DEC_ALL (DPOT_ADDR_CMD | (0x6 << 3)) |
#define | DPOT_INC_ALL (DPOT_ADDR_CMD | (0xB << 3)) |
#define | DPOT_SPI_RDAC 0xB0 |
#define | DPOT_SPI_EEPROM 0x30 |
#define | DPOT_SPI_READ_RDAC 0xA0 |
#define | DPOT_SPI_READ_EEPROM 0x90 |
#define | DPOT_SPI_DEC_ALL_6DB 0x50 |
#define | DPOT_SPI_INC_ALL_6DB 0xD0 |
#define | DPOT_SPI_DEC_ALL 0x70 |
#define | DPOT_SPI_INC_ALL 0xF0 |
#define | DPOT_AD5291_RDAC 0x01 |
#define | DPOT_AD5291_READ_RDAC 0x02 |
#define | DPOT_AD5291_STORE_XTPM 0x03 |
#define | DPOT_AD5291_CTRLREG 0x06 |
#define | DPOT_AD5291_UNLOCK_CMD 0x03 |
#define | DPOT_AD5270_1_2_4_RDAC 0x01 |
#define | DPOT_AD5270_1_2_4_READ_RDAC 0x02 |
#define | DPOT_AD5270_1_2_4_STORE_XTPM 0x03 |
#define | DPOT_AD5270_1_2_4_CTRLREG 0x07 |
#define | DPOT_AD5270_1_2_4_UNLOCK_CMD 0x03 |
#define | DPOT_AD5282_RDAC_AB 0x80 |
#define | DPOT_AD5273_FUSE 0x80 |
#define | DPOT_AD5170_2_3_FUSE 0x20 |
#define | DPOT_AD5170_2_3_OW 0x08 |
#define | DPOT_AD5172_3_A0 0x08 |
#define | DPOT_AD5170_2FUSE 0x80 |
Enumerations | |
enum | dpot_devid { AD5258_ID = DPOT_CONF(F_RDACS_RW_TOL, BRDAC0, 6, 0), AD5259_ID = DPOT_CONF(F_RDACS_RW_TOL, BRDAC0, 8, 1), AD5251_ID, AD5252_ID, AD5253_ID, AD5254_ID, AD5255_ID, AD5160_ID, AD5161_ID, AD5162_ID, AD5165_ID, AD5200_ID, AD5201_ID, AD5203_ID, AD5204_ID, AD5206_ID, AD5207_ID, AD5231_ID, AD5232_ID, AD5233_ID, AD5235_ID, AD5260_ID, AD5262_ID, AD5263_ID, AD5290_ID, AD5291_ID, AD5292_ID, AD5293_ID = DPOT_CONF(F_RDACS_RW | F_SPI_16BIT, BRDAC0, 10, 27), AD7376_ID, AD8400_ID, AD8402_ID, AD8403_ID, ADN2850_ID, AD5241_ID = DPOT_CONF(F_RDACS_RW, BRDAC0, 8, 33), AD5242_ID = DPOT_CONF(F_RDACS_RW, BRDAC0 | BRDAC1, 8, 34), AD5243_ID = DPOT_CONF(F_RDACS_RW, BRDAC0 | BRDAC1, 8, 35), AD5245_ID = DPOT_CONF(F_RDACS_RW, BRDAC0, 8, 36), AD5246_ID = DPOT_CONF(F_RDACS_RW, BRDAC0, 7, 37), AD5247_ID = DPOT_CONF(F_RDACS_RW, BRDAC0, 7, 38), AD5248_ID = DPOT_CONF(F_RDACS_RW, BRDAC0 | BRDAC1, 8, 39), AD5280_ID = DPOT_CONF(F_RDACS_RW, BRDAC0, 8, 40), AD5282_ID = DPOT_CONF(F_RDACS_RW, BRDAC0 | BRDAC1, 8, 41), ADN2860_ID, AD5273_ID = DPOT_CONF(F_RDACS_RW | F_CMD_OTP, BRDAC0, 6, 43), AD5171_ID = DPOT_CONF(F_RDACS_RW | F_CMD_OTP, BRDAC0, 6, 44), AD5170_ID = DPOT_CONF(F_RDACS_RW | F_CMD_OTP, BRDAC0, 8, 45), AD5172_ID = DPOT_CONF(F_RDACS_RW | F_CMD_OTP, BRDAC0 | BRDAC1, 8, 46), AD5173_ID = DPOT_CONF(F_RDACS_RW | F_CMD_OTP, BRDAC0 | BRDAC1, 8, 47), AD5270_ID, AD5271_ID, AD5272_ID = DPOT_CONF(F_RDACS_RW | F_CMD_OTP, BRDAC0, 10, 50), AD5274_ID = DPOT_CONF(F_RDACS_RW | F_CMD_OTP, BRDAC0, 8, 51) } |
Functions | |
int | ad_dpot_probe (struct device *dev, struct ad_dpot_bus_data *bdata, unsigned long devid, const char *name) |
int | ad_dpot_remove (struct device *dev) |
#define BRDAC0 (1 << 0) |
Definition at line 23 of file ad525x_dpot.h.
#define BRDAC1 (1 << 1) |
Definition at line 24 of file ad525x_dpot.h.
#define BRDAC2 (1 << 2) |
Definition at line 25 of file ad525x_dpot.h.
#define BRDAC3 (1 << 3) |
Definition at line 26 of file ad525x_dpot.h.
#define BRDAC4 (1 << 4) |
Definition at line 27 of file ad525x_dpot.h.
#define BRDAC5 (1 << 5) |
Definition at line 28 of file ad525x_dpot.h.
#define DPOT_AD5170_2_3_FUSE 0x20 |
Definition at line 190 of file ad525x_dpot.h.
#define DPOT_AD5170_2_3_OW 0x08 |
Definition at line 191 of file ad525x_dpot.h.
#define DPOT_AD5170_2FUSE 0x80 |
Definition at line 193 of file ad525x_dpot.h.
#define DPOT_AD5172_3_A0 0x08 |
Definition at line 192 of file ad525x_dpot.h.
#define DPOT_AD5270_1_2_4_CTRLREG 0x07 |
Definition at line 184 of file ad525x_dpot.h.
#define DPOT_AD5270_1_2_4_RDAC 0x01 |
Definition at line 181 of file ad525x_dpot.h.
#define DPOT_AD5270_1_2_4_READ_RDAC 0x02 |
Definition at line 182 of file ad525x_dpot.h.
#define DPOT_AD5270_1_2_4_STORE_XTPM 0x03 |
Definition at line 183 of file ad525x_dpot.h.
#define DPOT_AD5270_1_2_4_UNLOCK_CMD 0x03 |
Definition at line 185 of file ad525x_dpot.h.
#define DPOT_AD5273_FUSE 0x80 |
Definition at line 189 of file ad525x_dpot.h.
#define DPOT_AD5282_RDAC_AB 0x80 |
Definition at line 187 of file ad525x_dpot.h.
#define DPOT_AD5291_CTRLREG 0x06 |
Definition at line 177 of file ad525x_dpot.h.
#define DPOT_AD5291_RDAC 0x01 |
Definition at line 174 of file ad525x_dpot.h.
#define DPOT_AD5291_READ_RDAC 0x02 |
Definition at line 175 of file ad525x_dpot.h.
#define DPOT_AD5291_STORE_XTPM 0x03 |
Definition at line 176 of file ad525x_dpot.h.
#define DPOT_AD5291_UNLOCK_CMD 0x03 |
Definition at line 178 of file ad525x_dpot.h.
#define DPOT_ADDR_CMD (0x1 << 7) |
Definition at line 156 of file ad525x_dpot.h.
#define DPOT_ADDR_EEPROM (0x1 << 5) |
Definition at line 154 of file ad525x_dpot.h.
#define DPOT_ADDR_OTP (0x1 << 6) |
Definition at line 155 of file ad525x_dpot.h.
#define DPOT_ADDR_OTP_EN (0x1 << 9) |
Definition at line 157 of file ad525x_dpot.h.
#define DPOT_ADDR_RDAC (0x0 << 5) |
Definition at line 153 of file ad525x_dpot.h.
Definition at line 14 of file ad525x_dpot.h.
#define DPOT_DEC_ALL (DPOT_ADDR_CMD | (0x6 << 3)) |
Definition at line 161 of file ad525x_dpot.h.
#define DPOT_DEC_ALL_6DB (DPOT_ADDR_CMD | (0x4 << 3)) |
Definition at line 159 of file ad525x_dpot.h.
#define DPOT_FEAT | ( | conf | ) | (conf >> 18) |
Definition at line 21 of file ad525x_dpot.h.
#define DPOT_INC_ALL (DPOT_ADDR_CMD | (0xB << 3)) |
Definition at line 162 of file ad525x_dpot.h.
#define DPOT_INC_ALL_6DB (DPOT_ADDR_CMD | (0x9 << 3)) |
Definition at line 160 of file ad525x_dpot.h.
#define DPOT_MAX_POS | ( | conf | ) | ((conf >> 6) & 0xF) |
Definition at line 19 of file ad525x_dpot.h.
#define DPOT_RDAC0 0 |
Definition at line 135 of file ad525x_dpot.h.
#define DPOT_RDAC1 1 |
Definition at line 136 of file ad525x_dpot.h.
#define DPOT_RDAC2 2 |
Definition at line 137 of file ad525x_dpot.h.
#define DPOT_RDAC3 3 |
Definition at line 138 of file ad525x_dpot.h.
#define DPOT_RDAC4 4 |
Definition at line 139 of file ad525x_dpot.h.
#define DPOT_RDAC5 5 |
Definition at line 140 of file ad525x_dpot.h.
#define DPOT_RDAC_MASK 0x1F |
Definition at line 142 of file ad525x_dpot.h.
#define DPOT_REG_TOL 0x18 |
Definition at line 144 of file ad525x_dpot.h.
#define DPOT_SPI_DEC_ALL 0x70 |
Definition at line 170 of file ad525x_dpot.h.
#define DPOT_SPI_DEC_ALL_6DB 0x50 |
Definition at line 168 of file ad525x_dpot.h.
#define DPOT_SPI_EEPROM 0x30 |
Definition at line 165 of file ad525x_dpot.h.
#define DPOT_SPI_INC_ALL 0xF0 |
Definition at line 171 of file ad525x_dpot.h.
#define DPOT_SPI_INC_ALL_6DB 0xD0 |
Definition at line 169 of file ad525x_dpot.h.
#define DPOT_SPI_RDAC 0xB0 |
Definition at line 164 of file ad525x_dpot.h.
#define DPOT_SPI_READ_EEPROM 0x90 |
Definition at line 167 of file ad525x_dpot.h.
#define DPOT_SPI_READ_RDAC 0xA0 |
Definition at line 166 of file ad525x_dpot.h.
#define DPOT_TOL_RDAC0 (DPOT_REG_TOL | DPOT_RDAC0) |
Definition at line 145 of file ad525x_dpot.h.
#define DPOT_TOL_RDAC1 (DPOT_REG_TOL | DPOT_RDAC1) |
Definition at line 146 of file ad525x_dpot.h.
#define DPOT_TOL_RDAC2 (DPOT_REG_TOL | DPOT_RDAC2) |
Definition at line 147 of file ad525x_dpot.h.
#define DPOT_TOL_RDAC3 (DPOT_REG_TOL | DPOT_RDAC3) |
Definition at line 148 of file ad525x_dpot.h.
#define DPOT_TOL_RDAC4 (DPOT_REG_TOL | DPOT_RDAC4) |
Definition at line 149 of file ad525x_dpot.h.
#define DPOT_TOL_RDAC5 (DPOT_REG_TOL | DPOT_RDAC5) |
Definition at line 150 of file ad525x_dpot.h.
#define DPOT_UID | ( | conf | ) | (conf & 0x3F) |
Definition at line 18 of file ad525x_dpot.h.
#define DPOT_WIPERS | ( | conf | ) | ((conf >> 10) & 0xFF) |
Definition at line 20 of file ad525x_dpot.h.
Definition at line 37 of file ad525x_dpot.h.
Definition at line 32 of file ad525x_dpot.h.
Definition at line 31 of file ad525x_dpot.h.
#define F_CMD_OTP (1 << 2) /* Features OTP */ |
Definition at line 33 of file ad525x_dpot.h.
Definition at line 34 of file ad525x_dpot.h.
Definition at line 35 of file ad525x_dpot.h.
#define F_RDACS_RW_EEP (F_RDACS_RW | F_CMD_EEP) |
Definition at line 43 of file ad525x_dpot.h.
#define F_RDACS_RW_TOL (F_RDACS_RW | F_CMD_EEP | F_CMD_TOL) |
Definition at line 42 of file ad525x_dpot.h.
#define F_RDACS_WONLY (1 << 5) /* RDACS are Write only */ |
Definition at line 36 of file ad525x_dpot.h.
#define F_SPI (F_SPI_8BIT | F_SPI_16BIT | F_SPI_24BIT) |
Definition at line 44 of file ad525x_dpot.h.
Definition at line 39 of file ad525x_dpot.h.
Definition at line 40 of file ad525x_dpot.h.
Definition at line 38 of file ad525x_dpot.h.
#define MAX_RDACS 6 |
Definition at line 29 of file ad525x_dpot.h.
enum dpot_devid |
Definition at line 46 of file ad525x_dpot.h.
int ad_dpot_probe | ( | struct device * | dev, |
struct ad_dpot_bus_data * | bdata, | ||
unsigned long | devid, | ||
const char * | name | ||
) |
Definition at line 688 of file ad525x_dpot.c.
Definition at line 752 of file ad525x_dpot.c.