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>
26 * struct adis_timeouts - ADIS chip variant timeouts
27 * @reset_ms - Wait time after rst pin goes inactive
28 * @sw_reset_ms - Wait time after sw reset command
29 * @self_test_ms - Wait time after self test command
38 * struct adis_data - ADIS chip variant specific data
39 * @read_delay: SPI delay for read operations in us
40 * @write_delay: SPI delay for write operations in us
41 * @cs_change_delay: SPI delay between CS changes in us
47 * @self_test_mask: Bitmask of supported self-test operations
49 * @self_test_no_autoclear: True if device's self-test needs clear of ctrl reg
57 * @burst_len: Burst size in the SPI RX buffer. If @burst_max_len is defined,
61 * @burst_max_speed_hz: Maximum spi speed that can be used in burst mode
95 * struct adis - ADIS device instance data
96 * @spi: Reference to SPI device which owns this ADIS IIO device
103 * @msg: SPI message object
104 * @xfer: SPI transfer objects to be used for a @msg
108 * @tx: DMA safe TX buffer for SPI transfers
109 * @rx: DMA safe RX buffer for SPI transfers
112 struct spi_device *spi; member
119 * a sequence of SPI R/W in order to protect the SPI transfer
125 * This allows users of the ADIS library to group SPI R/W into
136 u8 rx[4]; member
140 struct spi_device *spi, const struct adis_data *data);
144 * adis_reset() - Reset the device
153 mutex_lock(&adis->state_lock); in adis_reset()
155 mutex_unlock(&adis->state_lock); in adis_reset()
166 * __adis_write_reg_8() - Write single byte to a register (unlocked)
178 * __adis_write_reg_16() - Write 2 bytes to a pair of registers (unlocked)
190 * __adis_write_reg_32() - write 4 bytes to four registers (unlocked)
202 * __adis_read_reg_16() - read 2 bytes from a 16-bit register (unlocked)
221 * __adis_read_reg_32() - read 4 bytes from a 32-bit register (unlocked)
240 * adis_write_reg() - write N bytes to register
251 mutex_lock(&adis->state_lock); in adis_write_reg()
253 mutex_unlock(&adis->state_lock); in adis_write_reg()
259 * adis_read_reg() - read N bytes from register
270 mutex_lock(&adis->state_lock); in adis_read_reg()
272 mutex_unlock(&adis->state_lock); in adis_read_reg()
278 * adis_write_reg_8() - Write single byte to a register
290 * adis_write_reg_16() - Write 2 bytes to a pair of registers
302 * adis_write_reg_32() - write 4 bytes to four registers
314 * adis_read_reg_16() - read 2 bytes from a 16-bit register
333 * adis_read_reg_32() - read 4 bytes from a 32-bit register
354 * adis_update_bits_base() - ADIS Update bits function - Locked version
368 mutex_lock(&adis->state_lock); in adis_update_bits_base()
370 mutex_unlock(&adis->state_lock); in adis_update_bits_base()
375 * adis_update_bits() - Wrapper macro for adis_update_bits_base - Locked version
391 * adis_update_bits() - Wrapper macro for adis_update_bits_base
414 mutex_lock(&adis->state_lock); in adis_enable_irq()
416 mutex_unlock(&adis->state_lock); in adis_enable_irq()
425 mutex_lock(&adis->state_lock); in adis_check_status()
427 mutex_unlock(&adis->state_lock); in adis_check_status()
434 mutex_lock(&adis->state_lock); in adis_dev_lock()
439 mutex_unlock(&adis->state_lock); in adis_dev_unlock()