STRUCT SPINAND_USER_OTP_OPS(9)
π 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
- 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