atmel_nor_s...l_protection(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 atmel_nor_s...l_protection(9) 🌸

okay so bestie, welcome to the Kernel API Manual β€” yes that's the whole manual name, we're in kernel land now, put your hair up πŸ’… this one's a single function and honestly she's cute and to the point.


✨ NAME ✨

atmel_nor_set_global_protection β€” literally does a Global Protect or Unprotect command. that's it, that's the whole job 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

int atmel_nor_set_global_protection (struct spi_nor *nor , loff_t ofs ,
       u64 len , bool is_protect );

copy it exactly, don't be creative with the signature babes, the compiler will humble you real fast 😭


πŸŽ€ ARGUMENTS πŸŽ€

  • nor β€” pointer to struct spi_nor. your main character struct, the whole flash situation lives in here πŸ‘‘
  • ofs β€” offset in bytes. where we're at, positionally speaking πŸ“
  • len β€” len in bytes. how much of it we're talking about πŸ“
  • is_protect β€” if true, do a Global Protect; otherwise it's a Global Unprotect. one bool, two vibes, choose wisely 🧚

⭐ RETURN ⭐

0 on success, -error otherwise. no cap, that's the whole contract β€” zero means slay, negative means the kernel is giving you a look πŸ’€


πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./drivers/mtd/spi-nor/atmel.c β€” go read the source if you wanna see her in her natural habitat 🌈


ngl bestie, this one's short but she ate β€” protect or unprotect, no in-between, periodt ✨

πŸ’– thanks for reading, ily, go touch some registers πŸ’–

signing off from ./drivers/mtd/spi-nor, dated October 2026 β€” mwah, see you in the next manpage πŸŽ€πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from