STRUCT SPINAND_MEM_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct spinand_mem_ops(9) β€” SPI NAND memory operations ✨

okay so this is a page straight out of the Kernel API Manual, bestie β€” <purple>struct spinand_mem_ops</purple> is literally the vibe board for SPI NAND memory ops. every single op template you could ever need lives in here, and we're gonna walk through all of them, no skips, no cap 🫢


✨ SYNOPSIS ✨

struct spinand_mem_ops {
    struct spi_mem_op reset;
    struct spi_mem_op readid;
    struct spi_mem_op wr_en;
    struct spi_mem_op wr_dis;
    struct spi_mem_op set_feature;
    struct spi_mem_op get_feature;
    struct spi_mem_op blk_erase;
    struct spi_mem_op page_read;
    struct spi_mem_op prog_exec;
    const struct spi_mem_op *read_cache;
    const struct spi_mem_op *write_cache;
    const struct spi_mem_op *update_cache;
    const struct spi_mem_op *cont_read_cache;
 };

like, look at that struct. it's giving organized. it's giving "i have a template for everything" πŸ‘‘


πŸŽ€ Members πŸŽ€

okay so here's the roster, and every single one of these is a <pink>template</pink> β€” they're the little blueprints the driver fills in later 🧚

  • reset β€” the reset op template ✨
  • readid β€” the read ID op template πŸ¦‹
  • wr_en β€” the write enable op template πŸ’–
  • wr_dis β€” the write disable op template 🌸
  • set_feature β€” the set feature op template ⭐
  • get_feature β€” the get feature op template πŸ”₯
  • blk_erase β€” the blk erase op template πŸ’€
  • page_read β€” the page read op template πŸ“–
  • prog_exec β€” the prog exec op template πŸŽ€
  • read_cache β€” the read cache op template πŸ‘‘
  • write_cache β€” the write cache op template πŸ’œ
  • update_cache β€” the update cache op template 🌈
  • cont_read_cache β€” the continuous read cache op template, and pls note it's optional πŸ™ˆ (the others? not marked optional. just this one. so cute of it)
ngl, the pointer-typed ones (read_cache, write_cache, update_cache, cont_read_cache) are const struct spi_mem_op * β€” the rest are plain struct spi_mem_op values. slay, but keep the types exact fr fr πŸ’…

🌸 SEE ALSO 🌸

like the whole spinand cinematic universe is referenced here, and the kernel file that spawned it all is:

  • ./include/linux/mtd/spinand.h

and the full friend group πŸ’–:

struct spinand_id(9), struct spinand_devid(9), struct spinand_manufacturer(9), struct spinand_op_variants(9), struct spinand_ondie_ecc_conf(9), struct spinand_otp_layout(9), struct spinand_fact_otp_ops(9), struct spinand_user_otp_ops(9), struct spinand_fact_otp(9), struct spinand_user_otp(9), enum spinand_bus_interface(9), struct spinand_info(9), struct spinand_device(9), mtd_to_spinand(9), spinand_to_mtd(9), nand_to_spinand(9), spinand_to_nand(9), spinand_set_of_node(9)


🫢 friendly reminder that cont_read_cache is the only one flagged optional here β€” everything else is just... there. no extra lore, don't @ me.

okay bestie that's the whole page, hope you ate it up πŸ“ this came to you from the <cyan>./include/linux/mtd</cyan> corner of the kernel, dated October 2026, and it's filed under struct spinand_mem_ops(9). periodt. πŸ’…βœ¨

πŸ“¦ where this page comes from