STRUCT SPINAND_INFO(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 the SPINAND_XXX flags. 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