STRUCT SPINAND_USER_OTP_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct spinand_user_otp_ops(9) β€” SPI NAND OTP methods for user area

okay bestie, welcome to the Kernel API Manual page for struct spinand_user_otp_ops ✨ β€” literally the little bundle of SPI NAND OTP methods for the user area, and no cap, it's giving "function pointers that do exactly what they say on the tin" πŸŽ€


✨ SYNOPSIS ✨

no thoughts, just vibes and a struct 🫢 here she is, character for character:

struct spinand_user_otp_ops {
    int (*info)(struct spinand_device *spinand, size_t len, struct
otp_info *buf, size_t *retlen);
    int (*lock)(struct spinand_device *spinand, loff_t from, size_t
len);
    int (*erase)(struct spinand_device *spinand, loff_t from, size_t
len);
    int (*read)(struct spinand_device *spinand, loff_t from, size_t len,
size_t *retlen, u8 *buf);
    int (*write)(struct spinand_device *spinand, loff_t from, size_t
len, size_t *retlen, const u8 *buf);
 };

like, she's a whole struct of callbacks and honestly? main character energy πŸ’œ


πŸ¦‹ Members πŸ¦‹

  • info β€” get the OTP area information πŸ’– she's the one who tells you what's up in there.
  • lock β€” lock an OTP region πŸ”’ once it's locked, that's periodt.
  • erase β€” erase an OTP region 🧹 bye bye bits.
  • read β€” read from the SPI NAND OTP area πŸ“– get those bytes bestie.
  • write β€” write to the SPI NAND OTP area ✍️ put those bytes in.

🌈 SEE ALSO 🌈

the Kernel file ./include/linux/mtd/spinand.h is where it lives, and here's the whole friend group 🫢 β€” every single one, not skipping a single icon:

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_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)

fr fr go read those too, they're all in ./include/linux/mtd/spinand.h and they ate πŸ’…

🌸 okay that's the whole page, mwah πŸ’‹ β€” this one's from ./include/linux/mtd, dated October 2026, and it's the struct spinand_user_otp_ops(9) page. iykyk β­πŸ‘‘

πŸ“¦ where this page comes from