STRUCT NAND_MANUFACTURER_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct nand_manufacturer_ops(9) ✨

okay so bestie, welcome to the Kernel API Manual β€” this one's all about struct nand_manufacturer_ops, aka the NAND Manufacturer operations πŸ’… the vibe is: this is the little struct where a NAND vendor drops their own custom hooks so the core code can call into vendor-specific magic. iykyk 🧚


🌸 NAME 🌸

struct nand_manufacturer_ops β€” literally the NAND Manufacturer operations, no cap 🫢


πŸ’– SYNOPSIS πŸ’–

here's the whole struct, copied exactly, don't come for me:

struct nand_manufacturer_ops {
    void (*detect)(struct nand_chip *chip);
    int (*init)(struct nand_chip *chip);
    void (*cleanup)(struct nand_chip *chip);
    void (*fixup_onfi_param_page)(struct nand_chip *chip, struct
nand_onfi_params *p);
 };
heads up ✨ the fixup_onfi_param_page line wraps in the original β€” the second line starts with nand_onfi_params *p); and the closing brace sits at one leading space. keeping it exactly as it is, bestie πŸŽ€

πŸ¦‹ MEMBERS πŸ¦‹

  • detect β€” this is the one that sniffs out the NAND memory organization and capabilities πŸ” it's giving detective main character energy, fr fr.
  • init β€” sets up all the vendor specific fields (like the ->read_retry implementation) if there are any πŸ’œ so like, if any β€” sometimes there just aren't, and that's fine.
  • cleanup β€” okay so the ->init function may have allocated resources, and ->cleanup is literally here so vendor specific code can release those resources πŸŽ€ cleanup crew, iconic.
  • fixup_onfi_param_page β€” applies vendor specific fixups to the ONFI parameter page ✨ and the important part: this gets called after the checksum is verified. so the checksum happens first, then the fixups β€” don't flip that, bestie 😭

🌈 SEE ALSO 🌈

  • Kernel file ./drivers/mtd/nand/raw/internals.h πŸ“
  • struct nand_manufacturer_desc(9) β€” go read that one next, it's the sibling πŸ’«

and that's the whole page, bestie, you ate that πŸ’…βœ¨

πŸ“ cute little sign-off: this one lives in ./drivers/mtd/nand/raw, dated October 2026, and the header up top is struct nand_...facturer_ops(9) 🫢 go forth and detect some NAND πŸ’–
πŸ“¦ where this page comes from