STRUCT NAND_OP_INSTR(9)
β¨ struct nand_op_instr(9) β¨
okay so bestie, welcome to the Kernel API Manual β we're talking about struct nand_op_instr today, aka the literal instruction object of the NAND world. it's giving "one tiny struct, so much responsibility" and honestly? iconic. π
πΈ NAME πΈ
struct nand_op_instr β Instruction object, no cap. that's it, that's the whole vibe. π
π¦ SYNOPSIS π¦
here's the shape of it, bestie β copy it exactly, don't freestyle:
struct nand_op_instr {
enum nand_op_instr_type type;
union {
struct nand_op_cmd_instr cmd;
struct nand_op_addr_instr addr;
struct nand_op_data_instr data;
struct nand_op_waitrdy_instr waitrdy;
} ctx;
unsigned int delay_ns;
};
π Members π
typeβ literally the instruction type. that's the whole job. π₯ctxβ the extra data that comes attached to the instruction. and here's the thing, bestie: you have to use the appropriate element depending ontype. like, don't just grab any of them, that's not the move πctx.cmdβ use it iftypeisNAND_OP_CMD_INSTR. easy. β¨ctx.addrβ use it iftypeisNAND_OP_ADDR_INSTR. πctx.dataβ use it iftypeisNAND_OP_DATA_IN_INSTRorNAND_OP_DATA_OUT_INSTR. both of those, yes. πctx.waitrdyβ use it iftypeisNAND_OP_WAITRDY_INSTR. π¦delay_nsβ the delay the controller should apply after the instruction has been issued on the bus. most modern controllers have internal timings control logic, and in that case the controller driver can just ignore this field. so like... it's there if you need it, no pressure πΈ
π SEE ALSO π
Kernel file ./include/linux/mtd/rawnand.h, plus the whole friend group β all of these, exactly as listed, bestie, i'm not skipping a single one: struct nand_parameters(9), struct nand_id(9), struct nand_ecc_step_info(9), struct nand_ecc_caps(9), struct nand_ecc_ctrl(9), struct nand_sdr_timings(9), struct nand_nvddr_timings(9), enum nand_interface_type(9), struct nand_interface_config(9), nand_interface_is_sdr(9), nand_interface_is_nvddr(9), nand_get_sdr_timings(9), nand_get_nvddr_timings(9), struct nand_op_cmd_instr(9), struct nand_op_addr_instr(9), struct nand_op_data_instr(9), struct nand_op_waitrdy_instr(9), enum nand_op_instr_type(9), struct nand_subop(9), struct nand_op_parser_addr_constraints(9), struct nand_op_parser_data_constraints(9), struct nand_op_parser_pattern_elem(9), struct nand_op_parser_pattern(9), struct nand_op_parser(9), struct nand_operation(9), struct nand_controller_ops(9), struct nand_controller(9), struct nand_legacy(9), struct nand_chip_ops(9), struct nand_manufacturer(9), struct nand_secure_region(9), struct nand_chip(9), nand_get_interface_config(9), struct nand_flash_dev(9), nand_opcode_8bits(9), nand_get_data_buf(9).
side note: that's a lot of structs. main character energy for the whole MTD headers folder, fr fr π
and that's the page, bestie! π«Ά cute little sign-off for you: this one lives in ./include/linux/mtd, dated October 2026 β go off, kernel docs. slay π
π¦ 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