STRUCT SPINAND_OP_VARIANTS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct spinand_op_variants(9) β€” like, the whole vibe

okay bestie, welcome to the Kernel API Manual ✨ specifically the page for struct spinand_op_variants, and no cap, this is one of those little structs that does so much behind the scenes. let's get into it 🫢


🌸 NAME 🌸

struct spinand_op_variants β€” SPI NAND operation variants. that's it, that's the name, she's literally described as "operation variants" and honestly? iconic of her πŸ’…


✨ SYNOPSIS ✨

here's the shape of her, exactly as written:

struct spinand_op_variants {
    const struct spi_mem_op *ops;
    unsigned int nops;
 };

yes the indentation of that closing brace is a little quirky, don't come for her, she's been through a lot 😭


πŸŽ€ Members πŸŽ€

  • ops β€” the list of variants for a given operation. like a whole little lineup of options, one per transfer style πŸ”₯
  • nops β€” the number of variants. the headcount of that lineup, so the core knows how many she's got 🌈

πŸ¦‹ Description πŸ¦‹

so here's the tea πŸ“ β€” some operations, like read-from-cache / write-to-cache, have several variants depending on the number of IO lines you use to transfer data or address cycles. different line counts, different flavors, same general task πŸ’–

this structure is the way to describe all the different variants a chip supports, and then let the core pick the best one based on what the SPI mem controller can actually do. so she's basically the menu, and the core is the one ordering πŸ‘‘

ngl, that's a genuinely slay division of labor β€” the chip says "here's everything I can do," the core says "bet, I'll take the one that works" ✨

πŸ‘‘ SEE ALSO πŸ‘‘

the kernel file in question, and yes we're doing the full list, no skipping, everyone gets their moment:

  • Kernel file ./include/linux/mtd/spinand.h
  • struct spinand_id(9)
  • struct spinand_devid(9)
  • struct spinand_manufacturer(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_mem_ops(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)

like, look at that friend group 😭 she keeps good company.


and that's the page, bestie πŸ’œ you found her in ./include/linux/mtd, dated October 2026, and she's from the Kernel API Manual. go forth and pick the best variant 🌟 periodt.

πŸ“¦ where this page comes from