atmel_nor_s...l_protection(9)
πΈ 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 tostruct 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β iftrue, 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
- 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