spi_controll..._mem_op_data(9)
π 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 thisdma_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-initializedsg_tablethat 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
spi_controller_dma_unmap_mem_op_data(9)spi_mem_supports_op(9)spi_mem_exec_op(9)spi_mem_get_name(9)spi_mem_set_dqs(9)spi_mem_has_dqs(9)spi_mem_adjust_op_size(9)spi_mem_adjust_op_freq(9)spi_mem_calc_op_duration(9)spi_mem_dirmap_create(9)spi_mem_dirmap_destroy(9)devm_spi_mem_dirmap_create(9)devm_spi_mem_dirmap_destroy(9)spi_mem_dirmap_read(9)spi_mem_dirmap_write(9)spi_mem_poll_status(9)spi_mem_driver_register_with_owner(9)spi_mem_driver_unregister(9)
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
- 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