1 #ifndef SPI_ADIS16080_H_
2 #define SPI_ADIS16080_H_
4 /* Output data format setting. 0: Twos complement. 1: Offset binary. */
5 #define ADIS16080_DIN_CODE 4
6 #define ADIS16080_DIN_GYRO (0 << 10) /* Gyroscope output */
7 #define ADIS16080_DIN_TEMP (1 << 10) /* Temperature output */
8 #define ADIS16080_DIN_AIN1 (2 << 10)
9 #define ADIS16080_DIN_AIN2 (3 << 10)
12 * 1: Write contents on DIN to control register.
13 * 0: No changes to control register.
16 #define ADIS16080_DIN_WRITE (1 << 15)
18 #define ADIS16080_MAX_TX 2
19 #define ADIS16080_MAX_RX 2
22 * struct adis16080_state - device instance specific data
23 * @us: actual spi_device to write data
24 * @indio_dev: industrial I/O device structure
25 * @tx: transmit buffer
27 * @buf_lock: mutex to protect tx and rx
29 struct adis16080_state {
30 struct spi_device *us;
31 struct iio_dev *indio_dev;
34 struct mutex buf_lock;
36 #endif /* SPI_ADIS16080_H_ */