devm_spi_mem_dirmap_create(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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. 🧚


πŸ’€ reminder bestie: the devm_ version ties the descriptor's lifetime to dev, 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 the devm_ variant, see spi_mem_dirmap_create for 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