include/linux/spi/offload/types.h
Source file repositories/reference/linux-study-clean/include/linux/spi/offload/types.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/spi/offload/types.h- Extension
.h- Size
- 3454 bytes
- Lines
- 110
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/bits.hlinux/types.h
Detected Declarations
struct devicestruct spi_offload_configstruct spi_offloadstruct spi_offload_trigger_periodicstruct spi_offload_trigger_configstruct spi_offload_opsenum spi_offload_trigger_type
Annotated Snippet
struct spi_offload_config {
/** @capability_flags: required capabilities. See %SPI_OFFLOAD_CAP_* */
u32 capability_flags;
};
/**
* struct spi_offload - offload instance
*/
struct spi_offload {
/** @provider_dev: for get/put reference counting */
struct device *provider_dev;
/** @priv: provider driver private data */
void *priv;
/** @ops: callbacks for offload support */
const struct spi_offload_ops *ops;
/** @xfer_flags: %SPI_OFFLOAD_XFER_* flags supported by provider */
u32 xfer_flags;
};
enum spi_offload_trigger_type {
/* Indication from SPI peripheral that data is read to read. */
SPI_OFFLOAD_TRIGGER_DATA_READY,
/* Trigger comes from a periodic source such as a clock. */
SPI_OFFLOAD_TRIGGER_PERIODIC,
};
/**
* spi_offload_trigger_periodic - configuration parameters for periodic triggers
* @frequency_hz: The rate that the trigger should fire in Hz.
* @offset_ns: A delay in nanoseconds between when this trigger fires
* compared to another trigger. This requires specialized hardware
* that supports such synchronization with a delay between two or
* more triggers. Set to 0 when not needed.
*/
struct spi_offload_trigger_periodic {
u64 frequency_hz;
u64 offset_ns;
};
struct spi_offload_trigger_config {
/** @type: type discriminator for union */
enum spi_offload_trigger_type type;
union {
struct spi_offload_trigger_periodic periodic;
};
};
/**
* struct spi_offload_ops - callbacks implemented by offload providers
*/
struct spi_offload_ops {
/**
* @trigger_enable: Optional callback to enable the trigger for the
* given offload instance.
*/
int (*trigger_enable)(struct spi_offload *offload);
/**
* @trigger_disable: Optional callback to disable the trigger for the
* given offload instance.
*/
void (*trigger_disable)(struct spi_offload *offload);
/**
* @tx_stream_request_dma_chan: Optional callback for controllers that
* have an offload where the TX data stream is connected directly to a
* DMA channel.
*/
struct dma_chan *(*tx_stream_request_dma_chan)(struct spi_offload *offload);
/**
* @rx_stream_request_dma_chan: Optional callback for controllers that
* have an offload where the RX data stream is connected directly to a
* DMA channel.
*/
struct dma_chan *(*rx_stream_request_dma_chan)(struct spi_offload *offload);
};
#endif /* __LINUX_SPI_OFFLOAD_TYPES_H */
Annotation
- Immediate include surface: `linux/bits.h`, `linux/types.h`.
- Detected declarations: `struct device`, `struct spi_offload_config`, `struct spi_offload`, `struct spi_offload_trigger_periodic`, `struct spi_offload_trigger_config`, `struct spi_offload_ops`, `enum spi_offload_trigger_type`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source implementation candidate.
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.