STRUCT SPI_MEM(9)
π struct spi_mem(9)
okay so bestie, welcome to the Kernel API Manual β this one's a little struct called struct spi_mem, and it's literally just here to describe a SPI memory device β¨
πΈ NAME
struct spi_mem β describes a SPI memory device π«Ά
β¨ SYNOPSIS
struct spi_mem {
struct spi_device *spi;
void *drvpriv;
const char *name;
bool dqs;
};
no cap, that's the whole thing. four fields. she's compact and she knows it π
π Members
spiβ the underlying SPI device. the main character of the operation, tbh πdrvprivβspi_mem_driverprivate data. it's giving "don't touch my stuff" energy, but like, respectfully π§nameβ name of the SPI memory device. so we know who we're dealing with πdqsβ extra data trobe pin available for high frequency read operations. (yes, "trobe" β that's literally what the page says, don't come for me π) highkey useful when you're going fast π₯
π¦ Description
Extra information that describes the SPI memory device β the kind of stuff the controller might need to properly handle this device β goes right here. literally this struct is the vibe-check container for it π
One example would be the device size, since some controllers expose their SPI mem devices through a io-mapped region. iykyk π
π SEE ALSO
Kernel file ./include/linux/spi/spi-mem.h, enum spi_mem_data_dir(9), struct spi_mem_op(9), struct spi_mem_dirmap_info(9), struct spi_mem_dirmap_desc(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)
go read all of them, i'll wait π
fr fr, this page comes straight out of./include/linux/spiand it's dated October 2026, filed understruct spi_mem(9)β slay, go forth and probe your memory devices πβ¨π
π¦ 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