1 #ifndef SPI_ADIS16201_H_
2 #define SPI_ADIS16201_H_
4 #define ADIS16201_STARTUP_DELAY 220
6 #define ADIS16201_READ_REG(a) a
7 #define ADIS16201_WRITE_REG(a) ((a) | 0x80)
9 #define ADIS16201_FLASH_CNT 0x00
10 #define ADIS16201_SUPPLY_OUT 0x02
11 #define ADIS16201_XACCL_OUT 0x04
12 #define ADIS16201_YACCL_OUT 0x06
13 #define ADIS16201_AUX_ADC 0x08
14 #define ADIS16201_TEMP_OUT 0x0A
15 #define ADIS16201_XINCL_OUT 0x0C
16 #define ADIS16201_YINCL_OUT 0x0E
17 #define ADIS16201_XACCL_OFFS 0x10
18 #define ADIS16201_YACCL_OFFS 0x12
19 #define ADIS16201_XACCL_SCALE 0x14
20 #define ADIS16201_YACCL_SCALE 0x16
21 #define ADIS16201_XINCL_OFFS 0x18
22 #define ADIS16201_YINCL_OFFS 0x1A
23 #define ADIS16201_XINCL_SCALE 0x1C
24 #define ADIS16201_YINCL_SCALE 0x1E
25 #define ADIS16201_ALM_MAG1 0x20
26 #define ADIS16201_ALM_MAG2 0x22
27 #define ADIS16201_ALM_SMPL1 0x24
28 #define ADIS16201_ALM_SMPL2 0x26
29 #define ADIS16201_ALM_CTRL 0x28
30 #define ADIS16201_AUX_DAC 0x30
31 #define ADIS16201_GPIO_CTRL 0x32
32 #define ADIS16201_MSC_CTRL 0x34
33 #define ADIS16201_SMPL_PRD 0x36
34 #define ADIS16201_AVG_CNT 0x38
35 #define ADIS16201_SLP_CNT 0x3A
36 #define ADIS16201_DIAG_STAT 0x3C
37 #define ADIS16201_GLOB_CMD 0x3E
39 #define ADIS16201_OUTPUTS 7
42 #define ADIS16201_MSC_CTRL_SELF_TEST_EN (1 << 8)
43 #define ADIS16201_MSC_CTRL_DATA_RDY_EN (1 << 2)
44 #define ADIS16201_MSC_CTRL_ACTIVE_HIGH (1 << 1)
45 #define ADIS16201_MSC_CTRL_DATA_RDY_DIO1 (1 << 0)
48 #define ADIS16201_DIAG_STAT_ALARM2 (1<<9)
49 #define ADIS16201_DIAG_STAT_ALARM1 (1<<8)
50 #define ADIS16201_DIAG_STAT_SPI_FAIL (1<<3)
51 #define ADIS16201_DIAG_STAT_FLASH_UPT (1<<2)
52 #define ADIS16201_DIAG_STAT_POWER_HIGH (1<<1)
53 #define ADIS16201_DIAG_STAT_POWER_LOW (1<<0)
56 #define ADIS16201_GLOB_CMD_SW_RESET (1<<7)
57 #define ADIS16201_GLOB_CMD_FACTORY_CAL (1<<1)
59 #define ADIS16201_MAX_TX 14
60 #define ADIS16201_MAX_RX 14
62 #define ADIS16201_ERROR_ACTIVE (1<<14)
92 #ifdef CONFIG_IIO_BUFFER
115 adis16201_read_data_from_ring(
struct device *
dev,
131 static inline int adis16201_initialize_ring(
struct iio_ring_buffer *
ring)
136 static inline void adis16201_uninitialize_ring(
struct iio_ring_buffer *
ring)