Lines Matching +full:spi +full:- +full:rx +full:- +full:delay +full:- +full:us
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
6 * Author: Lars-Peter Clausen <lars@metafoo.de>
12 #include <linux/spi/spi.h>
25 * struct adis_timeouts - ADIS chip variant timeouts
26 * @reset_ms - Wait time after rst pin goes inactive
27 * @sw_reset_ms - Wait time after sw reset command
28 * @self_test_ms - Wait time after self test command
36 * struct adis_data - ADIS chip variant specific data
37 * @read_delay: SPI delay for read operations in us
38 * @write_delay: SPI delay for write operations in us
39 * @cs_change_delay: SPI delay between CS changes in us
45 * @self_test_mask: Bitmask of supported self-test operations
47 * @self_test_no_autoclear: True if device's self-test needs clear of ctrl reg
54 * @burst_len: Burst size in the SPI RX buffer. If @burst_max_len is defined,
89 * struct adis - ADIS device instance data
90 * @spi: Reference to SPI device which owns this ADIS IIO device
97 * @msg: SPI message object
98 * @xfer: SPI transfer objects to be used for a @msg
102 * @tx: DMA safe TX buffer for SPI transfers
103 * @rx: DMA safe RX buffer for SPI transfers
106 struct spi_device *spi; member
113 * a sequence of SPI R/W in order to protect the SPI transfer
119 * This allows users of the ADIS library to group SPI R/W into
130 uint8_t rx[4]; member
134 struct spi_device *spi, const struct adis_data *data);
138 * adis_reset() - Reset the device
147 mutex_lock(&adis->state_lock); in adis_reset()
149 mutex_unlock(&adis->state_lock); in adis_reset()
160 * __adis_write_reg_8() - Write single byte to a register (unlocked)
172 * __adis_write_reg_16() - Write 2 bytes to a pair of registers (unlocked)
184 * __adis_write_reg_32() - write 4 bytes to four registers (unlocked)
196 * __adis_read_reg_16() - read 2 bytes from a 16-bit register (unlocked)
215 * __adis_read_reg_32() - read 4 bytes from a 32-bit register (unlocked)
234 * adis_write_reg() - write N bytes to register
245 mutex_lock(&adis->state_lock); in adis_write_reg()
247 mutex_unlock(&adis->state_lock); in adis_write_reg()
253 * adis_read_reg() - read N bytes from register
264 mutex_lock(&adis->state_lock); in adis_read_reg()
266 mutex_unlock(&adis->state_lock); in adis_read_reg()
272 * adis_write_reg_8() - Write single byte to a register
284 * adis_write_reg_16() - Write 2 bytes to a pair of registers
296 * adis_write_reg_32() - write 4 bytes to four registers
308 * adis_read_reg_16() - read 2 bytes from a 16-bit register
327 * adis_read_reg_32() - read 4 bytes from a 32-bit register
348 * adis_update_bits_base() - ADIS Update bits function - Locked version
362 mutex_lock(&adis->state_lock); in adis_update_bits_base()
364 mutex_unlock(&adis->state_lock); in adis_update_bits_base()
369 * adis_update_bits() - Wrapper macro for adis_update_bits_base - Locked version
387 * adis_update_bits() - Wrapper macro for adis_update_bits_base
412 mutex_lock(&adis->state_lock); in adis_check_status()
414 mutex_unlock(&adis->state_lock); in adis_check_status()
424 mutex_lock(&adis->state_lock); in adis_initial_startup()
426 mutex_unlock(&adis->state_lock); in adis_initial_startup()