STRUCT SPI_MEM_DIRMAP_DESC(9)
๐ NAME ๐
okay so bestie, this is struct spi_mem_dirmap_desc(9) from the Kernel API Manual: the direct mapping descriptor. thatโs the name, and yes itโs giving โtiny struct, big responsibilitiesโ energy ๐
โจ
โจ SYNOPSIS โจ
hereโs the literal shape of it, no cap:
struct spi_mem_dirmap_desc {
struct spi_mem *mem;
struct spi_mem_dirmap_info info;
unsigned int nodirmap;
void *priv;
};
๐ซถ Members ๐ซถ
memโ the SPI memory device this direct mapping is attached to. literally the memory device this mapping is glued to ๐ซถinfoโ information passed at direct mapping creation time. iykyk, itโs the creation-time info ๐ธnodirmapโ set to1if the SPI controller does not implement->mem_ops->dirmap_createor when this function returned an error. ifnodirmapis true, allspi_mem_dirmap_{read,write}()calls will usespi_mem_exec_opto access the memory. this is a degraded mode that allowsspi_memdrivers to use the same code no matter whether the controller supports direct mapping or not ๐ฅprivโ field pointing to controller specific data. thatโs the controllerโs own little private stash ๐
๐ธ Description ๐ธ
Common part of a direct mapping descriptor. this object is created by spi_mem_dirmap_create and controller implementation of ->create_dirmap can create/attach direct mapping resources to the descriptor in the ->priv field. periodt ๐
itโs literally the shared common piece, and the controller gets to hang its own resources off ->priv โ iconic behavior, honestly โจ
๐ฆ SEE ALSO ๐ฆ
Kernel file ./include/linux/spi/spi-mem.h is the main character here, and the whole squad is:
enum spi_mem_data_dir(9)struct spi_mem_op(9)struct spi_mem_dirmap_info(9)struct spi_mem(9)spi_mem_set_drvdata(9)spi_mem_get_drvdata(9)struct spi_controller_mem_ops(9)struct spi_controller_mem_caps(9)struct spi_mem_driver(9)
okay thatโs the whole vibe check, bestie! big kisses from source file ./include/linux/spi, dated October 2026, and this little page signs off as struct spi_mem_dirmap_desc(9) ๐โจ๐
๐ฆ 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