STRUCT SPI_OFFLOAD_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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