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
37 * struct adis_data - ADIS chip variant specific data
38 * @read_delay: SPI delay for read operations in us
39 * @write_delay: SPI delay for write operations in us
40 * @cs_change_delay: SPI delay between CS changes in us
46 * @self_test_mask: Bitmask of supported self-test operations
48 * @self_test_no_autoclear: True if device's self-test needs clear of ctrl reg
56 * @burst_len: Burst size in the SPI RX buffer. If @burst_max_len is defined,
60 * @burst_max_speed_hz: Maximum spi speed that can be used in burst mode
94 * struct adis - ADIS device instance data
95 * @spi: Reference to SPI device which owns this ADIS IIO device
102 * @msg: SPI message object
103 * @xfer: SPI transfer objects to be used for a @msg
107 * @tx: DMA safe TX buffer for SPI transfers
108 * @rx: DMA safe RX buffer for SPI transfers
111 struct spi_device *spi; member
118 * a sequence of SPI R/W in order to protect the SPI transfer
124 * This allows users of the ADIS library to group SPI R/W into
135 u8 rx[4]; member
139 struct spi_device *spi, const struct adis_data *data);
143 * adis_reset() - Reset the device
152 mutex_lock(&adis->state_lock); in adis_reset()
154 mutex_unlock(&adis->state_lock); in adis_reset()
165 * __adis_write_reg_8() - Write single byte to a register (unlocked)
177 * __adis_write_reg_16() - Write 2 bytes to a pair of registers (unlocked)
189 * __adis_write_reg_32() - write 4 bytes to four registers (unlocked)
201 * __adis_read_reg_16() - read 2 bytes from a 16-bit register (unlocked)
220 * __adis_read_reg_32() - read 4 bytes from a 32-bit register (unlocked)
239 * adis_write_reg() - write N bytes to register
250 mutex_lock(&adis->state_lock); in adis_write_reg()
252 mutex_unlock(&adis->state_lock); in adis_write_reg()
258 * adis_read_reg() - read N bytes from register
269 mutex_lock(&adis->state_lock); in adis_read_reg()
271 mutex_unlock(&adis->state_lock); in adis_read_reg()
277 * adis_write_reg_8() - Write single byte to a register
289 * adis_write_reg_16() - Write 2 bytes to a pair of registers
301 * adis_write_reg_32() - write 4 bytes to four registers
313 * adis_read_reg_16() - read 2 bytes from a 16-bit register
332 * adis_read_reg_32() - read 4 bytes from a 32-bit register
353 * adis_update_bits_base() - ADIS Update bits function - Locked version
367 mutex_lock(&adis->state_lock); in adis_update_bits_base()
369 mutex_unlock(&adis->state_lock); in adis_update_bits_base()
374 * adis_update_bits() - Wrapper macro for adis_update_bits_base - Locked version
390 * adis_update_bits() - Wrapper macro for adis_update_bits_base
413 mutex_lock(&adis->state_lock); in adis_check_status()
415 mutex_unlock(&adis->state_lock); in adis_check_status()
425 mutex_lock(&adis->state_lock); in adis_initial_startup()
427 mutex_unlock(&adis->state_lock); in adis_initial_startup()
434 mutex_lock(&adis->state_lock); in adis_dev_lock()
439 mutex_unlock(&adis->state_lock); in adis_dev_unlock()