STRUCT SPINAND_MEM_OPS(9)
π 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) areconst struct spi_mem_op *β the rest are plainstruct spi_mem_opvalues. 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
- 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