devm_spi_mem_dirmap_create(9)
π devm_spi_mem_dirmap_create(9) β like, the Kernel API Manual, bestie β¨
Okay so this is devm_spi_mem_dirmap_create(9), straight out of the Kernel API Manual, and honestly? It's giving "resource-managed era" and we're obsessed. π
πΈ NAME πΈ
devm_spi_mem_dirmap_create β okay so what it does is it creates a direct mapping descriptor, right? And then it attaches it to a device. That's the whole vibe. π
β¨ SYNOPSIS β¨
struct spi_mem_dirmap_desc * devm_spi_mem_dirmap_create (struct device
*dev , struct spi_mem *mem , const struct spi_mem_dirmap_info *info );
Like, it returns a struct spi_mem_dirmap_desc * and takes those three args. No cap. π«Ά
π¦ ARGUMENTS π¦
devβ the device that the dirmap desc is gonna get attached to. It's the main character here, fr. πmemβ the SPI mem device that this direct mapping should be created for. Like, whose map is this? This one's. π«infoβ the direct mapping information. All the deets live here. π
π DESCRIPTION π
So this is the devm_ variant of the spi_mem_dirmap_create function β iykyk, the devm_ prefix means it's the device-managed one. π
If you want the full lore, go see spi_mem_dirmap_create for more details, because this page is not about to retell the whole story. β¨
β RETURN β
You get a valid pointer in case of success π, and ERR_PTR otherwise π. That's it, that's the deal.
π₯ SEE ALSO π₯
Kernel file ./drivers/spi/spi-mem.c β go read it, bestie, it's iconic. π§
spi_controller_dma_map_mem_op_data(9)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_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)
π reminder bestie: thedevm_version ties the descriptor's lifetime todev, so like... don't go freeing it yourself and then letting the device cleanup hit it too. Resource-managed means resource-managed. π (That's just the whole point of thedevm_variant, seespi_mem_dirmap_createfor the deets.)
And that's the tea π β this cutie came from ./drivers/spi, dated October 2026, and it's filed under devm_spi_mem_dirmap_create(9). Slay. ππ¦
π¦ 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