cypress_nor_..._mode_nbytes(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

okay so bestie, this is the cypress_nor_..._mode_nbytes(9) page from the Kernel API Manual, and the function it's hyping up is cypress_nor_set_addr_mode_nbytes β€” it sets the number of address bytes mode of current address mode. yes, that is the whole assignment. πŸ’…

🌸 SYNOPSIS 🌸

int cypress_nor_set_addr_mode_nbytes (struct spi_nor *nor );

πŸ’… ARGUMENTS πŸ’…

  • nor β€” pointer to a 'struct spi_nor'. that's the one and only argument, bestie 🫢

πŸŽ€ DESCRIPTION πŸŽ€

so here's the vibe: it determines the current address mode by reading SR1 with different methods, then it queries CFR2V[7] to confirm. detective work, but make it SPI NOR ✨

and if that determination is failed, it doesn't just shrug β€” it force enters 4-byte address mode. no cap, that's the fallback. 😭

πŸ”₯ RETURN πŸ”₯

  • 0 β€” success, slay πŸ‘‘
  • -errno β€” otherwise, i.e. the error vibe πŸ’€

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file reference: ./drivers/mtd/spi-nor/spansion.c β€” plus struct spansion_nor_params(9) and these iconic little friends:


cute sign-off bestie: source/version is ./drivers/mtd/spi-nor, the date on this page is October 2026, and the whole page is cypress_nor_..._mode_nbytes(9). bye and stay address-moded πŸ’–πŸŽ€

πŸ“¦ where this page comes from