staging:iio:gyro remove adis16251 driver as now supported by adis16260 driver
[platform/adaptation/renesas_rcar/renesas_kernel.git] / drivers / staging / iio / gyro / adis16130.h
1 #ifndef SPI_ADIS16130_H_
2 #define SPI_ADIS16130_H_
3
4 #define ADIS16130_CON         0x0
5 #define ADIS16130_CON_RD      (1 << 6)
6 #define ADIS16130_IOP         0x1
7
8 /* 1 = data-ready signal low when unread data on all channels; */
9 #define ADIS16130_IOP_ALL_RDY (1 << 3)
10 #define ADIS16130_IOP_SYNC    (1 << 0) /* 1 = synchronization enabled */
11 #define ADIS16130_RATEDATA    0x8 /* Gyroscope output, rate of rotation */
12 #define ADIS16130_TEMPDATA    0xA /* Temperature output */
13 #define ADIS16130_RATECS      0x28 /* Gyroscope channel setup */
14 #define ADIS16130_RATECS_EN   (1 << 3) /* 1 = channel enable; */
15 #define ADIS16130_TEMPCS      0x2A /* Temperature channel setup */
16 #define ADIS16130_TEMPCS_EN   (1 << 3)
17 #define ADIS16130_RATECONV    0x30
18 #define ADIS16130_TEMPCONV    0x32
19 #define ADIS16130_MODE        0x38
20 #define ADIS16130_MODE_24BIT  (1 << 1) /* 1 = 24-bit resolution; */
21
22 #define ADIS16130_MAX_TX     4
23 #define ADIS16130_MAX_RX     4
24
25 /**
26  * struct adis16130_state - device instance specific data
27  * @us:                 actual spi_device to write data
28  * @indio_dev:          industrial I/O device structure
29  * @tx:                 transmit buffer
30  * @rx:                 recieve buffer
31  * @buf_lock:           mutex to protect tx and rx
32  **/
33 struct adis16130_state {
34         struct spi_device               *us;
35         struct iio_dev                  *indio_dev;
36         u8                              *tx;
37         u8                              *rx;
38         u32                             mode; /* 1: 24bits mode 0:16bits mode */
39         struct mutex                    buf_lock;
40 };
41
42 #endif /* SPI_ADIS16130_H_ */