spi_nor_wri...cr_and_check(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– spi_nor_wri...cr_and_check(9) πŸ’–

okay bestie, welcome to the Kernel API Manual β€” this is the page for spi_nor_wri...cr_and_check(9), and the full function name is spi_nor_write_16bit_sr_cr_and_check (iykyk, the header just truncates it for ✨drama✨).


🌸 NAME 🌸

spi_nor_write_16bit_sr_cr_and_check β€” write Status Register 1 and the Configuration Register in one shot. It also makes sure the bytes written in both registers match the received value, no cap. πŸ’…


✨ SYNOPSIS ✨

int spi_nor_write_16bit_sr_cr_and_check (struct spi_nor *nor , const u8 *regs );

πŸŽ€ ARGUMENTS πŸŽ€

  • nor β€” this is your pointer to a struct spi_nor, bestie. The whole flash-chip situation lives through this bad boy.
  • regs β€” a two-byte array holding the values that get written to the status and configuration registers. Exactly two bytes, exactly the values you want going out. 🫢

πŸ’… RETURN πŸ’…

  • 0 on success β€” slay. βœ…
  • -errno otherwise β€” not slay, but at least you get an error code. 😭

πŸ‘‘ SEE ALSO πŸ‘‘

the kernel file is ./drivers/mtd/spi-nor/core.c, and honestly it's giving main character energy with this whole friend group:


okay and for the cute sign-off: this page lives in ./drivers/mtd/spi-nor, dated October 2026, under the manual name spi_nor_wri...cr_and_check(9) β€” periodt, go write those registers correctly bestie πŸ’œβœ¨

πŸ“¦ where this page comes from