STRUCT SPINAND_INFO(9)
π struct spinand_info(9) β Kernel API Manual β¨
okay so bestie, we're diving into struct spinand_info(9) today, and honestly? she's the whole personality of every SPI NAND manufacturer driver out there. think of her as the group chat bio for a chip: model, ID, flags, vibes, the works. πΈ
β¨ NAME β¨
struct spinand_info β the structure used to describe SPI NAND chips π
π SYNOPSIS π
like, here's literally what she looks like, no edits, i promise:
struct spinand_info {
const char *model;
struct spinand_devid devid;
u32 flags;
struct nand_memory_organization memorg;
struct nand_ecc_props eccreq;
struct spinand_ecc_info eccinfo;
struct {
const struct spinand_op_variants *read_cache;
const struct spinand_op_variants *write_cache;
const struct spinand_op_variants *update_cache;
const struct spinand_op_variants *cont_read_cache;
} op_variants;
const struct spinand_op_variants *vendor_ops;
int (*select_target)(struct spinand_device *spinand, unsigned int
target);
int (*configure_chip)(struct spinand_device *spinand, enum
spinand_bus_interface iface);
int (*set_cont_read)(struct spinand_device *spinand, bool enable);
struct spinand_fact_otp fact_otp;
struct spinand_user_otp user_otp;
unsigned int read_retries;
int (*set_read_retry)(struct spinand_device *spinand, unsigned int
read_retry);
int (*set_randomizer)(struct spinand_device *spinand, bool enable);
};
yes the long function-pointer lines wrapped weirdly in the original, that's just how she renders, don't @ me π
π MEMBERS π
every field, in order, no skips, we're doing the full tour π
modelβ the model name. her name tag at the party πdevidβ device ID. so the kernel knows which chip she actually is.flagsβ OR-ing of theSPINAND_XXXflags. little booleans holding hands π«Άmemorgβ memory organization. like where everything lives in her head.eccreqβ ECC requirements. the standards she expects you to meet, highkey.eccinfoβ on-die ECC info. the ECC she was literally born with β¨op_variantsβ operations variants. the bundled package deal of operation flavors:op_variants.read_cacheβ variants of the read-cache operation.op_variants.write_cacheβ variants of the write-cache operation.op_variants.update_cacheβ variants of the update-cache operation.op_variants.cont_read_cacheβ variants of the continuous read-cache operation.
vendor_opsβ vendor specific operations. the custom lore only one manufacturer knows πselect_targetβ function used to select a target/die. Required only for multi-die chips. if she's a single-die girlie, this can vibe as NULL.configure_chipβ align the chip configuration with the core settings. the "let's get on the same page" function πset_cont_readβ enable/disable continuous cached reads.fact_otpβ SPI NAND factory OTP info.user_otpβ SPI NAND user OTP info.read_retriesβ the number of read retry modes supported.set_read_retryβ enable/disable read retry for data recovery. the "bestie i messed up, let's try again" button πset_randomizerβ enable/disable randomizer support. yes that's the real name, no she's not okay π₯
π¦ DESCRIPTION π¦
so the vibe check here is simple: each SPI NAND manufacturer driver should have a spinand_info table describing all the chips supported by the driver. not some, not the favorites β all of them. it's giving "whole roster, front to back". periodt. π
ngl, if you're writing a driver, this table is the driver's personality. skip an entry and the kernel will simply not know that chip exists. π
π SEE ALSO π
go read these next, i promise they're all linked lore:
Kernel file ./include/linux/mtd/spinand.h, 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_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)
and that's the whole page bestie π«Ά this lil' gem comes to you from ./include/linux/mtd, stamped October 2026 β screenshot it, cite it, cite me, whatever, just remember she ate β¨π
πΈ
π¦ 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