STRUCT SPI_REPLACED_TRANSFERS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct spi_replaced_transfers β€” the receipts for your SPI transfer glow-up πŸ’–

Okay so picture this: you swapped some transfers out, and now you need to be able to put them back exactly how they were. That's this struct, bestie. It's the one living in the Kernel API Manual section 9 of the manual pages, and it's literally the structure describing the spi_transfer replacements that have occurred so that they can get reverted. Like a save point but for transfers. πŸŽ€


✨ SYNOPSIS ✨

struct spi_replaced_transfers {
    spi_replaced_release_t release;
    void *extradata;
    struct list_head replaced_transfers;
    struct list_head *replaced_after;
    size_t inserted;
    struct spi_transfer inserted_transfers[];
 };

No cap, that's the whole vibe right there πŸ‘‘


🌸 Members 🌸

  • release β€” some extra release code to get executed prior to releasing this structure. It's the "bestie, do this one last thing before you go" hook πŸ’…
  • extradata β€” pointer to some extra data if requested, or NULL. Optional queen energy, lowkey always invited 🫢
  • replaced_transfers β€” transfers that have been replaced and which need to get restored. These are the ones we're holding safe until they get their comeback ✨
  • replaced_after β€” the transfer after which the replaced_transfers are to get re-inserted. So it's the landmark telling us where the old squad slots back in 🧚
  • inserted β€” number of transfers inserted. Just a count, but it's doing its job and we respect it πŸ“
  • inserted_transfers β€” array of spi_transfers of array-size inserted, that have been replacing replaced_transfers. The new main characters, honestly πŸ”₯

⭐ Note ⭐

Heads up, bestie: extradata will point to inserted_transfers[inserted] if some extra allocation is requested β€” so the alignment will be the same as for spi_transfers. Same alignment, same energy, iykyk πŸ’€

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./include/linux/spi/spi.h struct spi_statistics(9), struct spi_delay(9), struct spi_device(9), struct spi_driver(9), spi_unregister_driver(9), module_spi_driver(9), struct spi_controller(9), struct spi_res(9), struct spi_transfer(9), struct spi_message(9), spi_message_init_with_transfers(9), spi_is_bpw_supported(9), spi_bpw_to_bytes(9), spi_controller_xfer_timeout(9), spi_sync_transfer(9), spi_write(9), spi_read(9), spi_w8r8(9), spi_w8r16(9), spi_w8r16be(9), struct spi_board_info(9)

Yeah that's a lot of friends. Go read them too, they're all iconic πŸ˜­πŸ’œ


✿ and that's the whole page, bestie ✿

This one lives at ./include/linux/spi, dated October 2026, and it's filed under struct spi_...ed_transfers(9) in the Kernel API Manual β€” go off, kernel docs, slay πŸŒˆπŸ’–

πŸ“¦ where this page comes from