spi_nor_writ...cr_and_check(9)
πΈ 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 astruct spi_nor. yes the star struct itself, no knockoffs, no lookalikes π«Άcrβ the byte value you want written into the Configuration Register. it's au8, 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:
spi_nor_get_cmd_ext(9)spi_nor_spimem_setup_op(9)spi_nor_spimem_bounce(9)spi_nor_spimem_exec_op(9)spi_nor_spimem_read_data(9)spi_nor_read_data(9)spi_nor_spimem_write_data(9)spi_nor_write_data(9)spi_nor_read_any_reg(9)spi_nor_write_any_volatile_reg(9)spi_nor_write_enable(9)spi_nor_write_disable(9)spi_nor_read_id(9)spi_nor_read_sr(9)spi_nor_read_cr(9)spi_nor_set_4byte_addr_mode_en4b_ex4b(9)spi_nor_set_4byte_addr_mode_wren_en4b_ex4b(9)spi_nor_set_4byte_addr_mode_brwr(9)spi_nor_sr_ready(9)spi_nor_use_parallel_locking(9)spi_nor_ready(9)spi_nor_wait_till_ready_with_timeout(9)spi_nor_wait_till_ready(9)spi_nor_global_block_unlock(9)spi_nor_write_sr(9)spi_nor_write_sr1_and_check(9)spi_nor_write_16bit_sr_and_check(9)spi_nor_write_16bit_sr_cr_and_check(9)spi_nor_write_sr_and_check(9)spi_nor_write_sr_cr_and_check(9)spi_nor_write_sr2(9)spi_nor_read_sr2(9)spi_nor_erase_die(9)spi_nor_div_by_erase_size(9)spi_nor_find_best_erase_type(9)spi_nor_init_erase_cmd(9)spi_nor_destroy_erase_cmd_list(9)spi_nor_init_erase_cmd_list(9)spi_nor_erase_multi_sectors(9)spi_nor_sr1_bit6_quad_enable(9)spi_nor_sr2_bit1_quad_enable(9)spi_nor_sr2_bit7_quad_enable(9)spi_nor_spimem_check_read_pp_op(9)spi_nor_spimem_check_readop(9)spi_nor_spimem_check_pp(9)spi_nor_spimem_adjust_hwcaps(9)spi_nor_set_erase_type(9)spi_nor_mask_erase_type(9)spi_nor_init_uniform_erase_map(9)spi_nor_select_uniform_erase(9)spi_nor_manufacturer_init_params(9)spi_nor_no_sfdp_init_params(9)spi_nor_init_flags(9)spi_nor_init_fixup_flags(9)spi_nor_late_init_params(9)spi_nor_sfdp_init_params_deprecated(9)spi_nor_init_params_deprecated(9)spi_nor_init_default_params(9)spi_nor_init_params(9)spi_nor_quad_enable(9)spi_nor_set_4byte_addr_mode(9)spi_nor_soft_reset(9)
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 π«Ά: thedeprecatedones in that list (spi_nor_sfdp_init_params_deprecated(9)andspi_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
- 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