STRUCT SPI_OFFLOAD_OPS(9)
π struct spi_offload_ops (kernel API manual, bestie edition)
okay so picture this: you're deep in struct spi_offload_ops and it's literally just the β¨callbacksβ¨ that offload providers implement. That's the whole vibe. It's the plug-in contract, the group chat rules, the "here's what you gotta bring to the function-pointer party" π
πΈ NAME πΈ
struct spi_offload_ops β callbacks implemented by offload providers π
β¨ SYNOPSIS β¨
struct spi_offload_ops {
int (*trigger_enable)(struct spi_offload *offload);
void (*trigger_disable)(struct spi_offload *offload);
struct dma_chan *(*tx_stream_request_dma_chan)(struct spi_offload
*offload);
struct dma_chan *(*rx_stream_request_dma_chan)(struct spi_offload
*offload);
};
no cap, that's the whole struct. four function pointers, all vibes π«Ά
π¦ Members π¦
trigger_enableβ an optional callback, bestie! it enables the trigger for the given offload instance. that's it, that's the job β¨trigger_disableβ also optional, also iconic: it disables the trigger for the given offload instance. enable's counterpart, doing its little mirror thing πtx_stream_request_dma_chanβ optional callback, and it's for controllers that have an offload where the TX data stream is connected directly to a DMA channel. direct line to the DMA channel, no middleman, main character energy π₯rx_stream_request_dma_chanβ optional callback, same deal but for the RX side: for controllers that have an offload where the RX data stream is connected directly to a DMA channel π
quick reminder that every single one of these is optional β nobody's forcing you to implement all four, they're just there when your controller needs them π
π§ SEE ALSO π§
- Kernel file
./include/linux/spi/offload/types.h struct spi_offload_config(9)struct spi_offload(9)
go read those next, iykyk π
and that's the page, bestie π it lives at ./include/linux/spi/offload, dated October 2026 β ty for coming to my ted talk, mwah ππ
periodt.
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms