nand_erase_op(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

nand_erase_op β€” Do an erase operation ✨

okay so this is the Kernel API Manual page for nand_erase_op(9), and it's lowkey iconic for anyone doing raw NAND vibes 🫢


πŸŽ€ SYNOPSIS πŸŽ€

int nand_erase_op (struct nand_chip *chip , unsigned int eraseblock );

🌸 ARGUMENTS 🌸

  • chip β€” the NAND chip. Like, the actual chip, the main character of this operation πŸ’…
  • eraseblock β€” the block to erase. That's the target, bestie 🎯

πŸ¦‹ DESCRIPTION πŸ¦‹

So basically: this function sends an ERASE command and then waits for the NAND to be ready before it returns to you. It's giving "do the thing and chill until it's done" energy ⏳

heads up, bestie: this function does not select/unselect the CS line. That part is literally not its job πŸ’€

Return value tea: 0 on success, and a negative error code otherwise. No cap 😌

✨ SEE ALSO ✨

The kernel file is ./drivers/mtd/nand/raw/nand_base.c, and the whole NAND cinematic universe is linked here β€” every single one, periodt:


mwah πŸ’– this page lives in ./drivers/mtd/nand/raw, stamped October 2026, and it's literally nand_erase_op(9) β€” bye bestie, go erase responsibly πŸŽ€βœ¨

πŸ“¦ where this page comes from