spi_nor_writ...cr_and_check(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 spi_nor_writ...cr_and_check(9) β€” the Kernel API Manual glow-up 🌸

okay bestie, so this is from the kernel's own API manual (the Kernel API Manual one, you know the vibe), and it's literally the page for spi_nor_write_16bit_cr_and_check. yes that's the full name β€” the header just truncates it because even manpage headers have a character limit πŸ’…. buckle up, it's giving very niche-but-iconic.


✨ NAME ✨

spi_nor_write_16bit_cr_and_check β€” writes the Status Register 1 and the Configuration Register in one shot 🎯. and like… it's not gonna just fire and forget, no ma'am: it makes sure the byte that landed in the Configuration Register actually matches the value you handed it, and it also verifies that the 16-bit write didn't mess with whatever was already chilling in Status Register 1. basically the function version of "did you actually hear what I said" πŸ™ˆ


πŸŽ€ SYNOPSIS πŸŽ€

int spi_nor_write_16bit_cr_and_check (struct spi_nor *nor , u8 cr );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • nor β€” pointer to a struct spi_nor. yes the star struct itself, no knockoffs, no lookalikes 🫢
  • cr β€” the byte value you want written into the Configuration Register. it's a u8, so don't get cute with it πŸ’€

πŸ’– RETURN πŸ’–

0 on success, -errno otherwise. that's it. no in-between, no "it depends", and if it's not 0 bestie, that's a whole negative-errno situation 😭


🌈 SEE ALSO 🌈

okay this list is long long β€” like, this function has main character energy and knows literally everyone. here's the entire friendship circle, no cap:

also it lives in the kernel file ./drivers/mtd/spi-nor/core.c, so that's where you go if you wanna read the actual source. iykyk πŸ“


heads up bestie 🫢: the deprecated ones in that list (spi_nor_sfdp_init_params_deprecated(9) and spi_nor_init_params_deprecated(9)) literally have "deprecated" in the name β€” that's the manual telling you it's old news, so don't come for me if you build on them.

and that's the whole page, periodt πŸ’œ. source & version vibes: from ./drivers/mtd/spi-nor, dated October 2026 β€” this page ate and left absolutely no crumbs, mwah πŸŽ€βœ¨

πŸ“¦ where this page comes from