STRUCT SPI_MEM(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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_driver private 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/spi and it's dated October 2026, filed under struct spi_mem(9) β€” slay, go forth and probe your memory devices πŸ’–βœ¨πŸŽ€
πŸ“¦ where this page comes from