spi_nor_read_any_reg(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… spi_nor_read_any_reg β€” NAME ✨

okay so bestie, welcome to the kernel API manual πŸ’– this one is spi_nor_read_any_reg and it's literally the glow-up function that reads any register at all from flash memory β€” nonvolatile or volatile, no cap. πŸ‘‘


🌸 SYNOPSIS 🌸

int spi_nor_read_any_reg (struct spi_nor *nor , struct spi_mem_op *op ,
enum spi_nor_protocol proto );

that's the whole vibe check right there 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • nor β€” pointer to struct spi_nor. yes babe it's a pointer, it's giving main character energy πŸ¦‹
  • op β€” the SPI memory operation. and listen, this is the important bit: op->data.buf must be DMA-able. not optional, not a suggestion, fr fr πŸ’€
  • proto β€” the SPI protocol you want to use for the register operation. pick your fighter ✨

⭐ RETURN ⭐

zero on success, -errno otherwise 😭 so like… check it. please check it.


🧚 SEE ALSO 🧚

this list is LONG and honestly iconic β€” everything lives in the kernel file ./drivers/mtd/spi-nor/core.c πŸ“ so go read these too:

like… sixty whole functions. ate and left no crumbs πŸ“


anyway bestie that's the page πŸ’œ this one ships from ./drivers/mtd/spi-nor, dated October 2026 β€” mwah, go read your flash registers responsibly πŸ§šβ€β™€οΈπŸŒˆβœ¨

πŸ“¦ where this page comes from