STRUCT SPINAND_DEVID(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct spinand_devid(9) ✨

okay so bestie, welcome to the struct spinand_devid(9) page πŸ’… this is the Kernel API Manual moment where we learn how an SPI NAND chip says "hi, it's me" β€” like a little name tag but for silicon πŸŽ€


🌸 NAME 🌸

struct spinand_devid β€” the SPI NAND device id structure. literally the vibe check of "which chip am I even talking to" πŸ¦‹


⭐ SYNOPSIS ⭐

struct spinand_devid {
    const u8 *id;
    const u8 len;
    const enum spinand_readid_method method;
 };

no cap, that's the whole thing. three members, zero drama ✨


🧚 Members 🧚

  • id β€” the device id of the current chip πŸ‘‘ this is the actual fingerprint, bestie.
  • len β€” how many bytes live in the device id. it's a const u8, so like, it's not changing its mind πŸ™ˆ
  • method β€” the method used to read the chip id. there are 3 possible variants, and yes we're listing all of them because i would never do you like that:
    • SPINAND_READID_METHOD_OPCODE: the chip id is returned immediately after the read_id opcode πŸ”₯
    • SPINAND_READID_METHOD_OPCODE_ADDR: the chip id is returned after the read_id opcode + a 1-byte address πŸ“
    • SPINAND_READID_METHOD_OPCODE_DUMMY: the chip id is returned after the read_id opcode + 1 dummy byte πŸ’€ (yes, a whole byte of nothing. it's giving filler episode but it's load-bearing.)

πŸ¦‹ SEE ALSO πŸ¦‹

the whole friend group, fr fr β€” kernel file ./include/linux/mtd/spinand.h plus:

struct spinand_id(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_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)

go read them too, i'm not gatekeeping anything πŸ’–

and that's the page!! mwah 🫢 source is ./include/linux/mtd, dated October 2026 β€” catch you in the next struct spinand_devid(9), slay πŸŒˆπŸ‘‘

πŸ“¦ where this page comes from