spi_controll..._mem_op_data(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay bestie, welcome to the spi_controll..._mem_op_data(9) page from the Kernel API Manual ✨ this one is all about spi_controller_dma_map_mem_op_data β€” DMA-map the buffer attached to a memory operation. no cap, that's the whole vibe.

πŸŽ€ SYNOPSIS πŸŽ€

int spi_controller_dma_map_mem_op_data (struct spi_controller *ctlr ,
const struct spi_mem_op *op , struct sg_table *sgt );

🫢 ARGUMENTS 🫢

  • ctlr β€” the SPI controller requesting this dma_map. main character energy, requesting the map.
  • op β€” the memory operation containing the buffer to map. it's carrying the buffer, basically.
  • sgt β€” a pointer to a non-initialized sg_table that will be filled by this function. not initialized yet, bestie; this function fills it in. ✨

🌸 DESCRIPTION 🌸

so some controllers might want to do DMA on the data buffer embedded in op. this helper prepares everything for you and provides a ready-to-use sg_table. it's giving β€œI got you.” 🫢

big caveat: this function is not intended to be called from spi drivers. Only SPI controller drivers should use it. periodt. πŸ’…

also note that the caller must ensure the memory region pointed by op->data.buf.{in,out} is DMA-able before calling this function. like, that's on you, okay? don't skip the vibe check on DMA-ability. 😭

πŸ”₯ RETURN πŸ”₯

0 in case of success, a negative error code otherwise.

πŸ’œ SEE ALSO πŸ’œ

Kernel file ./drivers/spi/spi-mem.c

mwah πŸ’– that's the page, bestie. sourced from ./drivers/spi, dated October 2026, and it's literally the spi_controll..._mem_op_data(9) moment. bye! πŸ¦‹

πŸ“¦ where this page comes from