STRUCT SPINAND_OP_VARIANTS(9)
π 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
- 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