Lines Matching +full:spi +full:- +full:tx +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,
58 * @burst_max_speed_hz: Maximum spi speed that can be used in burst mode
91 * struct adis - ADIS device instance data
92 * @spi: Reference to SPI device which owns this ADIS IIO device
99 * @msg: SPI message object
100 * @xfer: SPI transfer objects to be used for a @msg
104 * @tx: DMA safe TX buffer for SPI transfers
105 * @rx: DMA safe RX buffer for SPI transfers
108 struct spi_device *spi; member
115 * a sequence of SPI R/W in order to protect the SPI transfer
121 * This allows users of the ADIS library to group SPI R/W into
131 uint8_t tx[10] ____cacheline_aligned; member
136 struct spi_device *spi, const struct adis_data *data);
140 * adis_reset() - Reset the device
149 mutex_lock(&adis->state_lock); in adis_reset()
151 mutex_unlock(&adis->state_lock); in adis_reset()
162 * __adis_write_reg_8() - Write single byte to a register (unlocked)
174 * __adis_write_reg_16() - Write 2 bytes to a pair of registers (unlocked)
186 * __adis_write_reg_32() - write 4 bytes to four registers (unlocked)
198 * __adis_read_reg_16() - read 2 bytes from a 16-bit register (unlocked)
217 * __adis_read_reg_32() - read 4 bytes from a 32-bit register (unlocked)
236 * adis_write_reg() - write N bytes to register
247 mutex_lock(&adis->state_lock); in adis_write_reg()
249 mutex_unlock(&adis->state_lock); in adis_write_reg()
255 * adis_read_reg() - read N bytes from register
266 mutex_lock(&adis->state_lock); in adis_read_reg()
268 mutex_unlock(&adis->state_lock); in adis_read_reg()
274 * adis_write_reg_8() - Write single byte to a register
286 * adis_write_reg_16() - Write 2 bytes to a pair of registers
298 * adis_write_reg_32() - write 4 bytes to four registers
310 * adis_read_reg_16() - read 2 bytes from a 16-bit register
329 * adis_read_reg_32() - read 4 bytes from a 32-bit register
350 * adis_update_bits_base() - ADIS Update bits function - Locked version
364 mutex_lock(&adis->state_lock); in adis_update_bits_base()
366 mutex_unlock(&adis->state_lock); in adis_update_bits_base()
371 * adis_update_bits() - Wrapper macro for adis_update_bits_base - Locked version
389 * adis_update_bits() - Wrapper macro for adis_update_bits_base
414 mutex_lock(&adis->state_lock); in adis_check_status()
416 mutex_unlock(&adis->state_lock); in adis_check_status()
426 mutex_lock(&adis->state_lock); in adis_initial_startup()
428 mutex_unlock(&adis->state_lock); in adis_initial_startup()
435 mutex_lock(&adis->state_lock); in adis_dev_lock()
440 mutex_unlock(&adis->state_lock); in adis_dev_unlock()