STRUCT SPI_ENGINE_MESSAGE_STATE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

okay so bestie, welcome to the Kernel API Manual ✨ β€” this page is all about struct spi_engine_message_state(9), aka the SPI engine per-message state. it’s giving β€œbookkeeping for one SPI message” and honestly? iconic. πŸ’…

✨ SYNOPSIS ✨

       struct spi_engine_message_state {
           unsigned cmd_length;
           const uint16_t *cmd_buf;
           struct spi_transfer *tx_xfer;
           unsigned int tx_length;
           const uint8_t *tx_buf;
           struct spi_transfer *rx_xfer;
           unsigned int rx_length;
           uint8_t *rx_buf;
        };

πŸ’… Members πŸ’…

  • cmd_length β€” Number of elements in cmd_buf array. the count bestie πŸ”’
  • cmd_buf β€” Array of commands not yet written to CMD FIFO. waiting-room energy 🎟️
  • tx_xfer β€” Next xfer with tx_buf not yet fully written to TX FIFO. next up, no cap πŸ“€
  • tx_length β€” Size of tx_buf in bytes. byte math slay πŸ“
  • tx_buf β€” Bytes not yet written to TX FIFO. still queued, still cute πŸ’Œ
  • rx_xfer β€” Next xfer with rx_buf not yet fully written to RX FIFO. incoming bestie πŸ“₯
  • rx_length β€” Size of tx_buf in bytes. (yes, tx_buf β€” that’s literally what the page says πŸ’€)
  • rx_buf β€” Bytes not yet written to the RX FIFO. the receive pile 🧺

πŸ¦‹ SEE ALSO πŸ¦‹

  • Kernel file ./drivers/spi/spi-axi-spi-engine.c β€” go peek if you want the source tea πŸ‘€πŸ“‚

mwah πŸ’‹ this page lives under ./drivers/spi, dated October 2026, and it’s the struct spi_...essage_state(9) entry β€” bye bestie, go slay some SPI! 🫢✨

πŸ“¦ where this page comes from