include/linux/iio/imu/adis.h
Source file repositories/reference/linux-study-clean/include/linux/iio/imu/adis.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/iio/imu/adis.h- Extension
.h- Size
- 17433 bytes
- Lines
- 586
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/cleanup.hlinux/spi/spi.hlinux/interrupt.hlinux/iio/iio.hlinux/iio/types.h
Detected Declarations
struct adisstruct iio_dev_attrstruct adis_timeoutstruct adis_datastruct adis_opsstruct adisfunction adis_resetfunction __adis_write_reg_8function __adis_write_reg_16function __adis_write_reg_32function __adis_read_reg_16function __adis_read_reg_32function adis_write_regfunction adis_read_regfunction adis_write_reg_8function adis_write_reg_16function adis_write_reg_32function adis_read_reg_16function adis_read_reg_32function adis_update_bits_basefunction adis_enable_irqfunction adis_check_statusfunction BITfunction devm_adis_setup_buffer_and_trigger_with_attrsfunction devm_adis_probe_trigger
Annotated Snippet
struct adis_timeout {
u16 reset_ms;
u16 sw_reset_ms;
u16 self_test_ms;
};
/**
* struct adis_data - ADIS chip variant specific data
* @read_delay: SPI delay for read operations in us
* @write_delay: SPI delay for write operations in us
* @cs_change_delay: SPI delay between CS changes in us
* @glob_cmd_reg: Register address of the GLOB_CMD register
* @msc_ctrl_reg: Register address of the MSC_CTRL register
* @diag_stat_reg: Register address of the DIAG_STAT register
* @diag_stat_size: Length (in bytes) of the DIAG_STAT register. If 0 the
* default length is 2 bytes long.
* @prod_id_reg: Register address of the PROD_ID register
* @prod_id: Product ID code that should be expected when reading @prod_id_reg
* @self_test_mask: Bitmask of supported self-test operations
* @self_test_reg: Register address to request self test command
* @self_test_no_autoclear: True if device's self-test needs clear of ctrl reg
* @status_error_msgs: Array of error messages
* @status_error_mask: Bitmask of errors supported by the device
* @timeouts: Chip specific delays
* @enable_irq: Hook for ADIS devices that have a special IRQ enable/disable
* @unmasked_drdy: True for devices that cannot mask/unmask the data ready pin
* @has_paging: True if ADIS device has paged registers
* @has_fifo: True if ADIS device has a hardware FIFO
* @burst_reg_cmd: Register command that triggers burst
* @burst_len: Burst size in the SPI RX buffer. If @burst_max_len is defined,
* this should be the minimum size supported by the device.
* @burst_max_len: Holds the maximum burst size when the device supports
* more than one burst mode with different sizes
* @burst_max_speed_hz: Maximum spi speed that can be used in burst mode
*/
struct adis_data {
unsigned int read_delay;
unsigned int write_delay;
unsigned int cs_change_delay;
unsigned int glob_cmd_reg;
unsigned int msc_ctrl_reg;
unsigned int diag_stat_reg;
unsigned int diag_stat_size;
unsigned int prod_id_reg;
unsigned int prod_id;
unsigned int self_test_mask;
unsigned int self_test_reg;
bool self_test_no_autoclear;
const struct adis_timeout *timeouts;
const char * const *status_error_msgs;
unsigned int status_error_mask;
int (*enable_irq)(struct adis *adis, bool enable);
bool unmasked_drdy;
bool has_paging;
bool has_fifo;
unsigned int burst_reg_cmd;
unsigned int burst_len;
unsigned int burst_max_len;
unsigned int burst_max_speed_hz;
};
/**
* struct adis_ops: Custom ops for adis devices.
* @write: Custom spi write implementation.
* @read: Custom spi read implementation.
* @reset: Custom sw reset implementation. The custom implementation does not
* need to sleep after the reset. It's done by the library already.
*/
struct adis_ops {
int (*write)(struct adis *adis, unsigned int reg, unsigned int value,
unsigned int size);
int (*read)(struct adis *adis, unsigned int reg, unsigned int *value,
unsigned int size);
int (*reset)(struct adis *adis);
};
/**
* struct adis - ADIS device instance data
* @spi: Reference to SPI device which owns this ADIS IIO device
* @trig: IIO trigger object data
* @data: ADIS chip variant specific data
* @burst_extra_len: Burst extra length. Should only be used by devices that can
* dynamically change their burst mode length.
Annotation
- Immediate include surface: `linux/cleanup.h`, `linux/spi/spi.h`, `linux/interrupt.h`, `linux/iio/iio.h`, `linux/iio/types.h`.
- Detected declarations: `struct adis`, `struct iio_dev_attr`, `struct adis_timeout`, `struct adis_data`, `struct adis_ops`, `struct adis`, `function adis_reset`, `function __adis_write_reg_8`, `function __adis_write_reg_16`, `function __adis_write_reg_32`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.